@artel/artc 0.6.26016 → 0.6.26017
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Cli.js +3 -3
- package/build/api/Api.js +3 -7
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +64 -253
- package/build/{chunk-R55UIINW.js → chunk-65XBWCU7.js} +2 -2
- package/build/{chunk-46EEXYHP.js → chunk-SJFIPH42.js} +2133 -3888
- package/build/{chunk-6YO3VB2X.js → chunk-UCBPXOLW.js} +1 -1
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +0 -1
- package/build/types/analysis/Analyzer.d.ts +8 -29
- package/build/types/analysis/BaseExpressionMeaning.d.ts +2 -14
- package/build/types/analysis/CallExpressionMeaning.d.ts +1 -11
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +2 -19
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +2 -17
- package/build/types/analysis/ReductionSourceMemberFinder.d.ts +0 -1
- package/build/types/analysis/ResolvedImplementationPackage.d.ts +1 -3
- package/build/types/analysis/SourceFileAnalyzer.d.ts +1 -1
- package/build/types/analysis/SpecialNameKey.d.ts +32 -0
- package/build/types/analysis/TypeMemberConflictsValidator.d.ts +0 -1
- package/build/types/analysis/TypeMemberLookup.d.ts +1 -5
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +1 -1
- package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +2 -2
- package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +1 -6
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +2 -30
- package/build/types/analysis/semantic-context/SemanticContextBuilder.d.ts +1 -5
- package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +2 -6
- package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +2 -6
- package/build/types/analysis/semantic-context/SpecialLocalDeclarationsBuilder.d.ts +0 -1
- package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +2 -17
- package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +1 -9
- package/build/types/common/Name.d.ts +3 -7
- package/build/types/diagnostic/DiagnosticCode.d.ts +110 -109
- package/build/types/emitter/EntityMap.d.ts +0 -1
- package/build/types/emitter/IrBuilder.d.ts +1 -2
- package/build/types/emitter/ir/Nodes.d.ts +24 -26
- package/build/types/entities/Entity.d.ts +2 -3
- package/build/types/entities/EntityLocalizationContext.d.ts +2 -3
- package/build/types/entities/OperatorKind.d.ts +20 -20
- package/build/types/entities/TypeEntityMembers.d.ts +2 -10
- package/build/types/entities/interfaces/FunctionEntity.d.ts +2 -1
- package/build/types/entities/interfaces/VariableEntity.d.ts +2 -2
- package/build/types/entities/interfaces/index.d.ts +0 -1
- package/build/types/entities/intrinsic/IntrinsicFunctionEntity.d.ts +4 -2
- package/build/types/entities/intrinsic/IntrinsicStructuredTypeEntity.d.ts +3 -3
- package/build/types/entities/source/SourceFunctionEntity.d.ts +4 -1
- package/build/types/entities/source/index.d.ts +0 -1
- package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +2 -1
- package/build/types/entities/translated/index.d.ts +0 -1
- package/build/types/parser/TokenKind.d.ts +1 -2
- package/build/types/services/DisplayService.d.ts +5 -27
- package/build/types/services/NodeSemanticInfo.d.ts +1 -6
- package/build/types/services/signature-help/SignatureWithParameters.d.ts +1 -8
- package/build/types/tree/BaseNode.d.ts +5 -5
- package/build/types/tree/Nodes.d.ts +7 -31
- package/build/types/tree/OperatorKind.d.ts +16 -17
- package/build/types/tree/SyntaxFactory.d.ts +0 -1
- package/build/types/tree/SyntaxToCode.d.ts +0 -1
- package/build/types/tree/TokenKind.d.ts +1 -2
- package/build/types/tree/index.d.ts +5 -5
- package/build/types/ts-interop/Entities.d.ts +3 -1
- package/build/types/types/TypeMembers.d.ts +3 -24
- package/package.json +1 -1
- package/build/types/analysis/OperatorAccessResolver.d.ts +0 -10
- package/build/types/entities/interfaces/OperatorEntity.d.ts +0 -25
- package/build/types/entities/source/SourceOperatorEntity.d.ts +0 -42
- package/build/types/entities/translated/TranslatedOperatorEntity.d.ts +0 -54
|
@@ -52,7 +52,6 @@ export declare class AnalyzedTranslationPackage {
|
|
|
52
52
|
private getTypeTranslationTargets;
|
|
53
53
|
private getFieldOrVariantTranslationTargets;
|
|
54
54
|
private getMethodTranslationTargets;
|
|
55
|
-
private tryGetOperatorTranslationTargets;
|
|
56
55
|
private getConstructorTranslationTargets;
|
|
57
56
|
private getIndexerTranslationTargets;
|
|
58
57
|
private checkTranslatedTypeParameterCount;
|
|
@@ -200,7 +200,6 @@ export declare class Analyzer {
|
|
|
200
200
|
getDenotedPackageAlias(expression: tree.Expression): e.PackageAliasEntity | undefined;
|
|
201
201
|
getDenotedFunction(expression: tree.Expression): ExpressionDenotesFunctionCheckResult | undefined;
|
|
202
202
|
isExpressionDenotingFunction(expression: tree.Expression): boolean;
|
|
203
|
-
getDenotedOperator(expression: tree.Expression): ExpressionDenotesOperatorCheckResult | undefined;
|
|
204
203
|
getDenotedPackageNameTreeNode(expression: tree.Expression): PackageNameTreeNode | undefined;
|
|
205
204
|
/**
|
|
206
205
|
* Функция считается генератором, если:
|
|
@@ -212,9 +211,9 @@ export declare class Analyzer {
|
|
|
212
211
|
isFunctionGenerator(node: FunctionDeclaration): boolean;
|
|
213
212
|
allAspectsOfType(type: types.Type): Iterable<types.StructuredType>;
|
|
214
213
|
checkTypeIsBasedOnAspect(type: types.Type, aspectEntity: e.StructuredTypeEntity): boolean;
|
|
215
|
-
resolvePrefixUnaryExpressionUserDefinableOperator(node: tree.PrefixUnaryExpression): types.
|
|
216
|
-
resolveBinaryExpressionUserDefinableOperator(node: tree.BinaryExpression, operatorKind: BinaryOperatorKind): types.
|
|
217
|
-
resolveCompoundAssignmentStatementOperator(node: tree.AssignmentStatement, operatorKind: BinaryOperatorKind): types.
|
|
214
|
+
resolvePrefixUnaryExpressionUserDefinableOperator(node: tree.PrefixUnaryExpression): types.Method | undefined;
|
|
215
|
+
resolveBinaryExpressionUserDefinableOperator(node: tree.BinaryExpression, operatorKind: BinaryOperatorKind): types.Method | undefined;
|
|
216
|
+
resolveCompoundAssignmentStatementOperator(node: tree.AssignmentStatement, operatorKind: BinaryOperatorKind): types.Method | undefined;
|
|
218
217
|
classifyBinaryExpressionOperator(operator: tree.BinaryExpressionOperator): BinaryExpressionOperatorClassificationResult;
|
|
219
218
|
getBinaryOperatorKindIfCompoundAssignmentOperator(operator: tree.AssignmentStatementOperator): BinaryOperatorKind | undefined;
|
|
220
219
|
getOriginalPackageEntities(): readonly e.PackageEntity[];
|
|
@@ -284,7 +283,6 @@ export declare class Analyzer {
|
|
|
284
283
|
instantiateTypeByIdentitySubstitution(entity: e.TypeEntity): types.Type;
|
|
285
284
|
instantiateTypeMemberByIdentitySubstitution(entity: e.FieldEntity): types.Field;
|
|
286
285
|
instantiateTypeMemberByIdentitySubstitution(entity: e.MethodEntity): types.Method;
|
|
287
|
-
instantiateTypeMemberByIdentitySubstitution(entity: e.OperatorEntity): types.Operator;
|
|
288
286
|
instantiateTypeMemberByIdentitySubstitution(entity: e.IndexerEntity): types.Indexer;
|
|
289
287
|
instantiateTypeMemberByIdentitySubstitution(entity: e.DereferenceOperatorEntity): types.DereferenceOperator;
|
|
290
288
|
instantiateTypeMemberByIdentitySubstitution(entity: e.ConstructorEntity): types.Constructor;
|
|
@@ -359,7 +357,6 @@ export declare namespace BinaryExpressionOperatorClassificationResult {
|
|
|
359
357
|
const subtract: BinaryExpressionOperatorClassificationResult;
|
|
360
358
|
const add: BinaryExpressionOperatorClassificationResult;
|
|
361
359
|
const divide: BinaryExpressionOperatorClassificationResult;
|
|
362
|
-
const integerDivide: BinaryExpressionOperatorClassificationResult;
|
|
363
360
|
const modulo: BinaryExpressionOperatorClassificationResult;
|
|
364
361
|
const bitwiseAnd: BinaryExpressionOperatorClassificationResult;
|
|
365
362
|
const bitwiseOr: BinaryExpressionOperatorClassificationResult;
|
|
@@ -453,7 +450,6 @@ declare class ReturnType {
|
|
|
453
450
|
ofNestedFunctionDeclaration(node: tree.NestedFunctionDeclaration): types.Type;
|
|
454
451
|
ofFunctionLiteral(node: tree.FunctionLiteral): types.Type;
|
|
455
452
|
ofMethodDeclaration(node: tree.MethodDeclaration): types.Type;
|
|
456
|
-
ofOperatorDeclaration(node: tree.OperatorDeclaration): types.Type;
|
|
457
453
|
ofPackageVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration): types.Type;
|
|
458
454
|
ofFieldGetterDeclaration(node: tree.FieldGetterDeclaration): types.Type;
|
|
459
455
|
ofDereferencedVariableGetterDeclaration(node: tree.DereferencedVariableGetterDeclaration): types.Type;
|
|
@@ -481,7 +477,6 @@ declare class Entity {
|
|
|
481
477
|
private readonly methodEntities;
|
|
482
478
|
private readonly nestedFunctionEntities;
|
|
483
479
|
private readonly constructorEntities;
|
|
484
|
-
private readonly operatorEntities;
|
|
485
480
|
private readonly destructorEntities;
|
|
486
481
|
private readonly getterEntities;
|
|
487
482
|
private readonly setterEntities;
|
|
@@ -518,7 +513,6 @@ declare class Entity {
|
|
|
518
513
|
ofPackageFunctionDeclaration(node: tree.PackageFunctionDeclaration): e.PackageFunctionEntity;
|
|
519
514
|
ofMethodDeclaration(node: tree.MethodDeclaration): e.MethodEntity;
|
|
520
515
|
ofNestedFunctionDeclaration(node: tree.NestedFunctionDeclaration): e.NestedFunctionEntity;
|
|
521
|
-
ofOperatorDeclaration(node: tree.OperatorDeclaration): e.OperatorEntity;
|
|
522
516
|
ofPackageVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration): e.GetterEntity;
|
|
523
517
|
ofFieldGetterDeclaration(node: tree.FieldGetterDeclaration): e.GetterEntity;
|
|
524
518
|
ofIndexedElementGetterDeclaration(node: tree.IndexedElementGetterDeclaration): e.GetterEntity;
|
|
@@ -560,7 +554,6 @@ declare class ResultLocalVariableEntity {
|
|
|
560
554
|
ofNestedFunctionDeclaration(node: tree.NestedFunctionDeclaration): e.LocalVariableEntity;
|
|
561
555
|
ofFunctionLiteral(node: tree.FunctionLiteral): e.LocalVariableEntity;
|
|
562
556
|
ofFunctionBlockLiteral(node: tree.FunctionBlockLiteral): e.LocalVariableEntity;
|
|
563
|
-
ofOperatorDeclaration(node: tree.OperatorDeclaration): e.LocalVariableEntity;
|
|
564
557
|
ofPackageVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration): e.LocalVariableEntity;
|
|
565
558
|
ofFieldGetterDeclaration(node: tree.FieldGetterDeclaration): e.LocalVariableEntity;
|
|
566
559
|
ofIndexedElementGetterDeclaration(node: tree.IndexedElementGetterDeclaration): e.LocalVariableEntity;
|
|
@@ -607,34 +600,28 @@ declare class OverriddenMember {
|
|
|
607
600
|
private readonly analyzer;
|
|
608
601
|
static readonly signatureComparisonOptions = SignatureComparisonOptions.None;
|
|
609
602
|
private readonly namedMemberFinder;
|
|
610
|
-
private readonly operatorFinder;
|
|
611
603
|
private readonly indexerFinder;
|
|
612
604
|
private readonly dereferenceOperatorFinder;
|
|
613
605
|
private readonly isField;
|
|
614
606
|
private readonly isMethod;
|
|
615
|
-
private readonly isOperator;
|
|
616
607
|
private readonly isIndexer;
|
|
617
608
|
private readonly isDereferenceOperator;
|
|
618
609
|
private readonly overriddenAndShadowedFields;
|
|
619
610
|
private readonly overriddenAndShadowedMethods;
|
|
620
|
-
private readonly overriddenAndShadowedOperators;
|
|
621
611
|
private readonly overriddenAndShadowedIndexers;
|
|
622
612
|
private readonly overriddenAndShadowedDereferenceOperators;
|
|
623
613
|
constructor(analyzer: Analyzer);
|
|
624
614
|
getOverriddenAndShadowedFields(node: tree.FieldDeclaration | FieldAccessorDeclaration): OverriddenAndShadowedMembers<types.Field, types.NamedTypeMember>;
|
|
625
615
|
getOverriddenAndShadowedMethods(node: tree.MethodDeclaration): OverriddenAndShadowedMembers<types.Method, types.NamedTypeMember>;
|
|
626
|
-
getOverriddenAndShadowedOperators(node: tree.OperatorDeclaration): OverriddenAndShadowedMembers<types.Operator>;
|
|
627
616
|
getOverriddenAndShadowedIndexers(node: IndexedElementAccessorDeclaration): OverriddenAndShadowedMembers<types.Indexer>;
|
|
628
617
|
getOverriddenAndShadowedDereferenceOperators(node: DereferencedVariableAccessorDeclaration): OverriddenAndShadowedMembers<types.DereferenceOperator>;
|
|
629
618
|
entityCanBeOverridden(entity: OverridableTypeMemberEntity): boolean;
|
|
630
619
|
getMemberTypeOrReturnType(member: types.TypeMember): types.Type;
|
|
631
620
|
private findOverriddenMembers;
|
|
632
621
|
private findOverriddenOrShadowedNamedMembersInType;
|
|
633
|
-
private findOverriddenOrShadowedOperatorsInType;
|
|
634
622
|
private findOverriddenOrShadowedIndexersInType;
|
|
635
623
|
private findOverriddenOrShadowedDereferenceOperatorsInType;
|
|
636
624
|
private checkMethodOverridesOrShadowsMethod;
|
|
637
|
-
private checkOperatorOverridesOrShadowsOperator;
|
|
638
625
|
private checkIndexerOverridesOrShadowsIndexer;
|
|
639
626
|
private typeMemberLookups;
|
|
640
627
|
private typesForOverriddenMemberLookup;
|
|
@@ -657,9 +644,9 @@ export declare class OverriddenAndShadowedMembers<TOverriddenMember extends Over
|
|
|
657
644
|
readonly shadowedMembers: readonly ShadowedMemberInfo<TShadowedMember>[];
|
|
658
645
|
constructor(overriddenMembers: readonly TOverriddenMember[], shadowedMembers: readonly ShadowedMemberInfo<TShadowedMember>[]);
|
|
659
646
|
}
|
|
660
|
-
export type OverridableTypeMemberEntity = e.FieldEntity | e.MethodEntity | e.
|
|
647
|
+
export type OverridableTypeMemberEntity = e.FieldEntity | e.MethodEntity | e.IndexerEntity | e.DereferenceOperatorEntity;
|
|
661
648
|
export declare function isOverridableTypeMemberEntity(entity: e.TypeMemberEntity): entity is OverridableTypeMemberEntity;
|
|
662
|
-
export type OverridableTypeMember = types.Field | types.Method | types.
|
|
649
|
+
export type OverridableTypeMember = types.Field | types.Method | types.Indexer | types.DereferenceOperator;
|
|
663
650
|
export declare function isOverridableTypeMember(entity: types.TypeMember): entity is OverridableTypeMember;
|
|
664
651
|
export type NodeWithTags = tree.PackageMemberDeclaration | tree.TypeMemberDeclaration | tree.ParameterDeclaration;
|
|
665
652
|
declare class Tags {
|
|
@@ -682,7 +669,6 @@ declare class ImplementationEntity {
|
|
|
682
669
|
ofPackageFunction(entity: e.PackageFunctionEntity, platform: PlatformKind): e.PackageFunctionEntity | undefined;
|
|
683
670
|
ofField(entity: e.FieldEntity, platform: PlatformKind): e.FieldEntity | undefined;
|
|
684
671
|
ofMethod(entity: e.MethodEntity, platform: PlatformKind): e.MethodEntity | undefined;
|
|
685
|
-
ofOperator(entity: e.OperatorEntity, platform: PlatformKind): e.OperatorEntity | undefined;
|
|
686
672
|
ofConstructor(entity: e.ConstructorEntity, platform: PlatformKind): e.ConstructorEntity | undefined;
|
|
687
673
|
ofDestructor(entity: e.DestructorEntity, platform: PlatformKind): e.DestructorEntity | undefined;
|
|
688
674
|
ofIndexer(entity: e.IndexerEntity, platform: PlatformKind): e.IndexerEntity | undefined;
|
|
@@ -825,8 +811,8 @@ declare class ConflictsCheck {
|
|
|
825
811
|
*/
|
|
826
812
|
doPackageTypesConflict(type1: e.PackageTypeEntity, type2: e.PackageTypeEntity): boolean;
|
|
827
813
|
}
|
|
828
|
-
export type EntityWithoutTypeParametersInSignature = e.ConstructorEntity | e.DestructorEntity | e.
|
|
829
|
-
export type TypeMemberWithoutTypeParametersInSignature = types.Constructor | types.Destructor | types.
|
|
814
|
+
export type EntityWithoutTypeParametersInSignature = e.ConstructorEntity | e.DestructorEntity | e.IndexerEntity;
|
|
815
|
+
export type TypeMemberWithoutTypeParametersInSignature = types.Constructor | types.Destructor | types.Indexer;
|
|
830
816
|
export declare class ExpressionDenotesFunctionCheckResult {
|
|
831
817
|
readonly candidates: readonly AccessedFunction[];
|
|
832
818
|
readonly suitableFunctions: readonly AccessedFunction[];
|
|
@@ -835,22 +821,15 @@ export declare class ExpressionDenotesFunctionCheckResult {
|
|
|
835
821
|
get singleFunction(): AccessedFunction | undefined;
|
|
836
822
|
constructor(candidates: readonly AccessedFunction[], suitableFunctions: readonly AccessedFunction[], singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined);
|
|
837
823
|
}
|
|
838
|
-
export declare class ExpressionDenotesOperatorCheckResult {
|
|
839
|
-
readonly candidates: readonly types.Operator[];
|
|
840
|
-
readonly suitableOperators: readonly types.Operator[];
|
|
841
|
-
get singleSuitableOperator(): types.Operator | undefined;
|
|
842
|
-
constructor(candidates: readonly types.Operator[], suitableOperators: readonly types.Operator[]);
|
|
843
|
-
}
|
|
844
824
|
export declare class DeclaredTypeMemberEntities {
|
|
845
825
|
readonly variables: readonly e.FieldEntity[];
|
|
846
826
|
readonly methods: readonly e.MethodEntity[];
|
|
847
|
-
readonly operators: readonly e.OperatorEntity[];
|
|
848
827
|
readonly constructors: readonly e.ConstructorEntity[];
|
|
849
828
|
readonly destructors: readonly e.DestructorEntity[];
|
|
850
829
|
readonly indexers: readonly e.IndexerEntity[];
|
|
851
830
|
readonly dereferenceOperators: readonly e.DereferenceOperatorEntity[];
|
|
852
831
|
get namedMembers(): e.NamedTypeMemberEntity[];
|
|
853
|
-
constructor(variables: readonly e.FieldEntity[], methods: readonly e.MethodEntity[],
|
|
832
|
+
constructor(variables: readonly e.FieldEntity[], methods: readonly e.MethodEntity[], constructors: readonly e.ConstructorEntity[], destructors: readonly e.DestructorEntity[], indexers: readonly e.IndexerEntity[], dereferenceOperators: readonly e.DereferenceOperatorEntity[]);
|
|
854
833
|
}
|
|
855
834
|
export declare class ExpressionAnalysisOptions {
|
|
856
835
|
readonly targetType: types.Type | undefined;
|
|
@@ -12,7 +12,6 @@ export declare class FirstStageResolver {
|
|
|
12
12
|
private resolveBaseConstructorOrMethodAccess;
|
|
13
13
|
private resolveBaseConstructorAccess;
|
|
14
14
|
private resolveBaseMethodAccess;
|
|
15
|
-
private resolveBaseOperatorAccess;
|
|
16
15
|
private resolveBaseObjectAccess;
|
|
17
16
|
private invalidContextDiagnostic;
|
|
18
17
|
private getBaseOrAliasedType;
|
|
@@ -35,9 +34,8 @@ export declare class SecondStageResolver {
|
|
|
35
34
|
constructor(analyzer: Analyzer, node: tree.BaseExpression, firstStageMeaning: MeaningStage1, diagnostics: DiagnosticAcceptor | undefined);
|
|
36
35
|
resolve(): Meaning;
|
|
37
36
|
private resolveOverriddenMethodAccess;
|
|
38
|
-
private resolveOverriddenOperatorAccess;
|
|
39
37
|
}
|
|
40
|
-
export type Meaning = Meaning_baseObjectAccess | Meaning_baseConstructorAccess | Meaning_overriddenMethodAccess |
|
|
38
|
+
export type Meaning = Meaning_baseObjectAccess | Meaning_baseConstructorAccess | Meaning_overriddenMethodAccess | Meaning_unresolved;
|
|
41
39
|
declare class Meaning_baseObjectAccess {
|
|
42
40
|
readonly type: types.Type;
|
|
43
41
|
readonly kind = "base-object-access";
|
|
@@ -72,23 +70,13 @@ declare class Meaning_overriddenMethodAccess {
|
|
|
72
70
|
readonly kind = "overridden-method-access";
|
|
73
71
|
constructor(method: AccessedFunction);
|
|
74
72
|
}
|
|
75
|
-
declare class Meaning_overriddenOperatorAccess {
|
|
76
|
-
readonly operator: types.Operator;
|
|
77
|
-
readonly kind = "overridden-operator-access";
|
|
78
|
-
constructor(operator: types.Operator);
|
|
79
|
-
}
|
|
80
73
|
declare class Meaning_unresolved {
|
|
81
74
|
readonly kind = "unresolved";
|
|
82
75
|
}
|
|
83
|
-
export type MeaningStage1 = Meaning_baseObjectAccess | Meaning_baseConstructorAccess | MeaningStage1_overriddenMethodAccess |
|
|
76
|
+
export type MeaningStage1 = Meaning_baseObjectAccess | Meaning_baseConstructorAccess | MeaningStage1_overriddenMethodAccess | Meaning_unresolved;
|
|
84
77
|
declare class MeaningStage1_overriddenMethodAccess {
|
|
85
78
|
readonly method: types.Method;
|
|
86
79
|
readonly kind = "overridden-method-access";
|
|
87
80
|
constructor(method: types.Method);
|
|
88
81
|
}
|
|
89
|
-
declare class MeaningStage1_overriddenOperatorAccess {
|
|
90
|
-
readonly operator: types.Operator;
|
|
91
|
-
readonly kind = "overridden-operator-access";
|
|
92
|
-
constructor(operator: types.Operator);
|
|
93
|
-
}
|
|
94
82
|
export {};
|
|
@@ -13,13 +13,11 @@ export declare class Resolver {
|
|
|
13
13
|
resolve(): Meaning;
|
|
14
14
|
private checkExpressionDenotesType;
|
|
15
15
|
private checkExpressionDenotesFunction;
|
|
16
|
-
private checkExpressionDenotesOperator;
|
|
17
16
|
private resolveFunctionCallExpression;
|
|
18
|
-
private resolveOperatorCallExpression;
|
|
19
17
|
private resolveConstructorCallExpression;
|
|
20
18
|
private resolveObjectFunctionCallExpression;
|
|
21
19
|
}
|
|
22
|
-
export type Meaning = Meaning_functionCall |
|
|
20
|
+
export type Meaning = Meaning_functionCall | Meaning_objectFunctionCall | Meaning_constructorCall | Meaning_unresolved;
|
|
23
21
|
export declare class Meaning_functionCall {
|
|
24
22
|
readonly candidates: readonly NotSubstitutedAccessedFunction[];
|
|
25
23
|
readonly suitableFunctions: readonly AccessedFunction[];
|
|
@@ -29,14 +27,6 @@ export declare class Meaning_functionCall {
|
|
|
29
27
|
get singleFunction(): AccessedFunction | undefined;
|
|
30
28
|
constructor(candidates: readonly NotSubstitutedAccessedFunction[], suitableFunctions: readonly AccessedFunction[], singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined);
|
|
31
29
|
}
|
|
32
|
-
export declare class Meaning_operatorCall {
|
|
33
|
-
readonly candidates: readonly types.Operator[];
|
|
34
|
-
readonly suitableOperators: readonly types.Operator[];
|
|
35
|
-
readonly kind = "operator-call";
|
|
36
|
-
get singleSuitableOperator(): types.Operator | undefined;
|
|
37
|
-
get singleOperator(): types.Operator | undefined;
|
|
38
|
-
constructor(candidates: readonly types.Operator[], suitableOperators: readonly types.Operator[]);
|
|
39
|
-
}
|
|
40
30
|
export declare class Meaning_objectFunctionCall {
|
|
41
31
|
readonly type: types.FunctionType;
|
|
42
32
|
readonly kind = "object-function-call";
|
|
@@ -16,7 +16,6 @@ export declare class FirstStageResolver {
|
|
|
16
16
|
private get semanticContext();
|
|
17
17
|
constructor(analyzer: Analyzer, node: tree.IdentifierExpression, diagnostics: DiagnosticAcceptor | undefined);
|
|
18
18
|
resolve(): MeaningStage1;
|
|
19
|
-
private tryResolveOperatorAccessMeaning;
|
|
20
19
|
private resolveTypeAccess;
|
|
21
20
|
private createNotSubstitutedAccessedFunction;
|
|
22
21
|
private convertSyntacticAccessKind;
|
|
@@ -31,10 +30,9 @@ export declare class SecondStageResolver {
|
|
|
31
30
|
resolve(): Meaning;
|
|
32
31
|
private resolveTypeAccessAtCalleePosition;
|
|
33
32
|
private resolveFunctionAccess;
|
|
34
|
-
private resolveOperatorAccess;
|
|
35
33
|
private resolveNotCalledFunctionsAccess;
|
|
36
34
|
}
|
|
37
|
-
export type Meaning = Meaning_variableAccess | Meaning_functionAccess |
|
|
35
|
+
export type Meaning = Meaning_variableAccess | Meaning_functionAccess | Meaning_packageNameSegmentAccess | Meaning_packageAliasAccess | Meaning_typeAccess | Meaning_constructorAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
|
38
36
|
declare class Meaning_variableAccess {
|
|
39
37
|
readonly variable: AccessedVariable;
|
|
40
38
|
readonly accessKind: AccessKind;
|
|
@@ -52,15 +50,6 @@ declare class Meaning_functionAccess {
|
|
|
52
50
|
get singleFunction(): AccessedFunction | undefined;
|
|
53
51
|
constructor(candidates: readonly NotSubstitutedAccessedFunction[], suitableFunctions: readonly AccessedFunction[], singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined, objectParameterContainingFunctions: ParameterEntity | undefined);
|
|
54
52
|
}
|
|
55
|
-
declare class Meaning_operatorAccess {
|
|
56
|
-
readonly candidates: readonly types.Operator[];
|
|
57
|
-
readonly suitableOperators: readonly types.Operator[];
|
|
58
|
-
readonly objectParameterContainingOperators: ParameterEntity | undefined;
|
|
59
|
-
readonly kind = "operator-access";
|
|
60
|
-
get singleSuitableOperator(): types.Operator | undefined;
|
|
61
|
-
get singleOperator(): types.Operator | undefined;
|
|
62
|
-
constructor(candidates: readonly types.Operator[], suitableOperators: readonly types.Operator[], objectParameterContainingOperators: ParameterEntity | undefined);
|
|
63
|
-
}
|
|
64
53
|
declare class Meaning_packageAliasAccess {
|
|
65
54
|
readonly packageAlias: PackageAliasEntity;
|
|
66
55
|
readonly kind = "package-alias-access";
|
|
@@ -92,7 +81,7 @@ declare class Meaning_mixedAmbiguousAccess {
|
|
|
92
81
|
declare class Meaning_unresolved {
|
|
93
82
|
readonly kind = "unresolved";
|
|
94
83
|
}
|
|
95
|
-
export type MeaningStage1 = Meaning_variableAccess | MeaningStage1_functionAccess |
|
|
84
|
+
export type MeaningStage1 = Meaning_variableAccess | MeaningStage1_functionAccess | Meaning_packageNameSegmentAccess | Meaning_packageAliasAccess | MeaningStage1_typeAccessAtCalleePosition | Meaning_typeAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
|
96
85
|
declare class MeaningStage1_typeAccessAtCalleePosition {
|
|
97
86
|
readonly types: readonly NamedTypeEntity[];
|
|
98
87
|
readonly kind = "type-access-at-callee-position";
|
|
@@ -104,12 +93,6 @@ declare class MeaningStage1_functionAccess {
|
|
|
104
93
|
readonly kind = "function-access";
|
|
105
94
|
constructor(functions: readonly NotSubstitutedAccessedFunction[], objectParameterContainingFunctions: ParameterEntity | undefined);
|
|
106
95
|
}
|
|
107
|
-
declare class MeaningStage1_operatorAccess {
|
|
108
|
-
readonly operators: readonly types.Operator[];
|
|
109
|
-
readonly objectParameterContainingOperators: ParameterEntity | undefined;
|
|
110
|
-
readonly kind = "operator-access";
|
|
111
|
-
constructor(operators: readonly types.Operator[], objectParameterContainingOperators: ParameterEntity | undefined);
|
|
112
|
-
}
|
|
113
96
|
export type AccessedVariable = AccessedVariable_entity | AccessedVariable_typeMember;
|
|
114
97
|
export declare class AccessedVariable_entity implements IAccessedVariable {
|
|
115
98
|
readonly value: VariableEntity;
|
|
@@ -23,7 +23,6 @@ export declare class FirstStageResolver {
|
|
|
23
23
|
private resolvePackageNameSegmentAccessMeaning;
|
|
24
24
|
private resolveStaticMemberOrVariantAccessMeaning;
|
|
25
25
|
private resolveInstanceMemberAccessMeaning;
|
|
26
|
-
private tryResolveInstanceOperatorAccessMeaning;
|
|
27
26
|
private convertPackageVariableSyntacticAccessKind;
|
|
28
27
|
private convertFieldSyntacticAccessKind;
|
|
29
28
|
}
|
|
@@ -40,9 +39,8 @@ export declare class SecondStageResolver {
|
|
|
40
39
|
private resolveStaticMethodAccess;
|
|
41
40
|
private resolveInstanceMethodAccess;
|
|
42
41
|
private resolveNotCalledFunctionsAccess;
|
|
43
|
-
private resolveOperatorAccess;
|
|
44
42
|
}
|
|
45
|
-
export type Meaning = Meaning_packageVariableAccess | Meaning_packageFunctionAccess | Meaning_packageTypeAccess | Meaning_constructorAccess | Meaning_packageNameSegmentAccess | Meaning_staticFieldAccess | Meaning_staticMethodAccess | Meaning_instanceFieldAccess | Meaning_instanceMethodAccess |
|
|
43
|
+
export type Meaning = Meaning_packageVariableAccess | Meaning_packageFunctionAccess | Meaning_packageTypeAccess | Meaning_constructorAccess | Meaning_packageNameSegmentAccess | Meaning_staticFieldAccess | Meaning_staticMethodAccess | Meaning_instanceFieldAccess | Meaning_instanceMethodAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
|
46
44
|
declare class Meaning_packageVariableAccess {
|
|
47
45
|
readonly variable: PackageVariableEntity;
|
|
48
46
|
readonly accessKind: AccessKind;
|
|
@@ -108,14 +106,6 @@ declare class Meaning_instanceMethodAccess {
|
|
|
108
106
|
get singleFunction(): AccessedFunction | undefined;
|
|
109
107
|
constructor(candidates: readonly NotSubstitutedAccessedFunction[], suitableFunctions: readonly AccessedFunction[], singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined);
|
|
110
108
|
}
|
|
111
|
-
declare class Meaning_operatorAccess {
|
|
112
|
-
readonly candidates: readonly types.Operator[];
|
|
113
|
-
readonly suitableOperators: readonly types.Operator[];
|
|
114
|
-
readonly kind = "operator-access";
|
|
115
|
-
get singleSuitableOperator(): types.Operator | undefined;
|
|
116
|
-
get singleOperator(): types.Operator | undefined;
|
|
117
|
-
constructor(candidates: readonly types.Operator[], suitableOperators: readonly types.Operator[]);
|
|
118
|
-
}
|
|
119
109
|
declare class Meaning_mixedAmbiguousAccess {
|
|
120
110
|
readonly entities: readonly Entity[];
|
|
121
111
|
readonly kind = "mixed-ambiguous-access";
|
|
@@ -124,7 +114,7 @@ declare class Meaning_mixedAmbiguousAccess {
|
|
|
124
114
|
declare class Meaning_unresolved {
|
|
125
115
|
readonly kind = "unresolved";
|
|
126
116
|
}
|
|
127
|
-
export type MeaningStage1 = Meaning_packageVariableAccess | MeaningStage1_packageFunctionAccess | Meaning_packageTypeAccess | MeaningStage1_typeAccessAtCalleePosition | Meaning_packageNameSegmentAccess | Meaning_staticFieldAccess | MeaningStage1_staticMethodAccess | Meaning_instanceFieldAccess | MeaningStage1_instanceMethodAccess |
|
|
117
|
+
export type MeaningStage1 = Meaning_packageVariableAccess | MeaningStage1_packageFunctionAccess | Meaning_packageTypeAccess | MeaningStage1_typeAccessAtCalleePosition | Meaning_packageNameSegmentAccess | Meaning_staticFieldAccess | MeaningStage1_staticMethodAccess | Meaning_instanceFieldAccess | MeaningStage1_instanceMethodAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
|
128
118
|
declare class MeaningStage1_typeAccessAtCalleePosition {
|
|
129
119
|
readonly types: readonly PackageTypeEntity[];
|
|
130
120
|
readonly kind = "type-access-at-callee-position";
|
|
@@ -146,9 +136,4 @@ declare class MeaningStage1_instanceMethodAccess {
|
|
|
146
136
|
readonly kind = "instance-method-access";
|
|
147
137
|
constructor(functions: readonly NotSubstitutedAccessedFunction[]);
|
|
148
138
|
}
|
|
149
|
-
declare class MeaningStage1_operatorAccess {
|
|
150
|
-
readonly operators: readonly types.Operator[];
|
|
151
|
-
readonly kind = "operator-access";
|
|
152
|
-
constructor(operators: readonly types.Operator[]);
|
|
153
|
-
}
|
|
154
139
|
export {};
|
|
@@ -10,7 +10,6 @@ export declare class ReductionSourceMemberFinder {
|
|
|
10
10
|
constructor(analyzer: Analyzer);
|
|
11
11
|
findField(member: types.Field, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, diagnosticLocation: NodeOrDiagnosticLocation): types.Field | undefined;
|
|
12
12
|
findMethod(member: types.Method, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, diagnosticLocation: NodeOrDiagnosticLocation): types.Method | undefined;
|
|
13
|
-
findOperator(member: types.Operator, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, diagnosticLocation: NodeOrDiagnosticLocation): types.Operator | undefined;
|
|
14
13
|
findConstructor(member: types.Constructor, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, diagnosticLocation: NodeOrDiagnosticLocation): types.Constructor | undefined;
|
|
15
14
|
findDestructor(member: types.Destructor, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, diagnosticLocation: NodeOrDiagnosticLocation): types.Destructor | undefined;
|
|
16
15
|
findIndexer(member: types.Indexer, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, diagnosticLocation: NodeOrDiagnosticLocation): types.Indexer | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConstructorEntity, DereferenceOperatorEntity, DestructorEntity, FieldEntity, IndexerEntity, MethodEntity,
|
|
1
|
+
import { ConstructorEntity, DereferenceOperatorEntity, DestructorEntity, FieldEntity, IndexerEntity, MethodEntity, PackageEntity, PackageFunctionEntity, PackageTypeEntity, PackageVariableEntity, TypeEntity } from '../entities/index.js';
|
|
2
2
|
import { PlatformKind } from '../project/index.js';
|
|
3
3
|
import { Analyzer } from './Analyzer.js';
|
|
4
4
|
export declare class ResolvedImplementationPackage {
|
|
@@ -24,7 +24,6 @@ export declare class ResolvedImplementationPackage {
|
|
|
24
24
|
getPackageTypeImplementation(entity: PackageTypeEntity): PackageTypeEntity | undefined;
|
|
25
25
|
getFieldImplementation(entity: FieldEntity): FieldEntity | undefined;
|
|
26
26
|
getMethodImplementation(entity: MethodEntity): MethodEntity | undefined;
|
|
27
|
-
getOperatorImplementation(entity: OperatorEntity): OperatorEntity | undefined;
|
|
28
27
|
getConstructorImplementation(entity: ConstructorEntity): ConstructorEntity | undefined;
|
|
29
28
|
getDestructorImplementation(entity: DestructorEntity): DestructorEntity | undefined;
|
|
30
29
|
getIndexerImplementation(entity: IndexerEntity): IndexerEntity | undefined;
|
|
@@ -33,7 +32,6 @@ export declare class ResolvedImplementationPackage {
|
|
|
33
32
|
private getTypeMemberImplementations;
|
|
34
33
|
private findFieldImplementation;
|
|
35
34
|
private findMethodImplementation;
|
|
36
|
-
private findOperatorImplementation;
|
|
37
35
|
private findConstructorImplementation;
|
|
38
36
|
private findDestructorImplementation;
|
|
39
37
|
private findIndexerImplementation;
|
|
@@ -51,7 +51,6 @@ export declare class SourceFileAnalyzer {
|
|
|
51
51
|
private checkPackageVariableSetterDeclaration;
|
|
52
52
|
private checkConstructorDeclaration;
|
|
53
53
|
private checkMethodDeclaration;
|
|
54
|
-
private checkOperatorDeclaration;
|
|
55
54
|
private checkFieldDeclaration;
|
|
56
55
|
private checkFieldGetterDeclaration;
|
|
57
56
|
private checkFieldSetterDeclaration;
|
|
@@ -101,6 +100,7 @@ export declare class SourceFileAnalyzer {
|
|
|
101
100
|
private overridingMemberHasCorrectHiding;
|
|
102
101
|
private checkTextTranslationDeclaration;
|
|
103
102
|
private attachNodeLocationAndAddDiagnostics;
|
|
103
|
+
private createAndAddDiagnostic;
|
|
104
104
|
private addDiagnostic;
|
|
105
105
|
private addDiagnostics;
|
|
106
106
|
private addDiagnosticsLocatedInAnalyzedFile;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Name } from '../common/index.js';
|
|
2
|
+
import { OperatorKind } from '../entities/OperatorKind.js';
|
|
3
|
+
import { OperatorKind as SyntacticalOperatorKind } from '../tree/OperatorKind.js';
|
|
4
|
+
export declare const specialNameKeys: {
|
|
5
|
+
readonly objectParameter: "-объект";
|
|
6
|
+
readonly plusOperator: "+";
|
|
7
|
+
readonly minusOperator: "-";
|
|
8
|
+
readonly notOperator: "-не";
|
|
9
|
+
readonly multiplyOperator: "*";
|
|
10
|
+
readonly divideOperator: "/";
|
|
11
|
+
readonly moduloOperator: "%";
|
|
12
|
+
readonly lessThanOperator: "<";
|
|
13
|
+
readonly greaterThanOperator: ">";
|
|
14
|
+
readonly lessThanOrEqualOperator: "<=";
|
|
15
|
+
readonly greaterThanOrEqualOperator: ">=";
|
|
16
|
+
readonly orOperator: "-или";
|
|
17
|
+
readonly andOperator: "-и";
|
|
18
|
+
readonly xorOperator: "-искл";
|
|
19
|
+
readonly bitwiseAndOperator: "&";
|
|
20
|
+
readonly bitwiseOrOperator: "|";
|
|
21
|
+
readonly bitwiseXorOperator: "||";
|
|
22
|
+
readonly leftShiftOperator: "<<";
|
|
23
|
+
readonly signedRightShiftOperator: ">>";
|
|
24
|
+
readonly unsignedRightShiftOperator: ">>>";
|
|
25
|
+
};
|
|
26
|
+
export declare const specialNames: { readonly [K in keyof typeof specialNameKeys]: Name; };
|
|
27
|
+
export declare const specialNameKeyBySyntacticalOperatorKind: {
|
|
28
|
+
readonly [T in SyntacticalOperatorKind]: string;
|
|
29
|
+
};
|
|
30
|
+
export declare const searchNameByOperatorKind: {
|
|
31
|
+
readonly [T in OperatorKind]: Name;
|
|
32
|
+
};
|
|
@@ -12,7 +12,6 @@ export declare class TypeMemberConflictsValidator {
|
|
|
12
12
|
private validateMethodsWithSameName;
|
|
13
13
|
private validateConstructors;
|
|
14
14
|
private validateDestructors;
|
|
15
|
-
private validateOperators;
|
|
16
15
|
private validateIndexers;
|
|
17
16
|
private validateDereferenceOperators;
|
|
18
17
|
private validateMembersWithoutTypeParametersInSignature;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Name, PackageLocale } from '../common/index.js';
|
|
2
|
-
import {
|
|
2
|
+
import { PackageEntity, TypeEntity, TypeExtensionEntity, TypeOrExtensionEntity } from '../entities/index.js';
|
|
3
3
|
import { SourceFile } from '../project/SourceFile.js';
|
|
4
4
|
import * as types from '../types/index.js';
|
|
5
5
|
import { Analyzer } from './Analyzer.js';
|
|
@@ -14,8 +14,6 @@ export declare class TypeMemberLookup {
|
|
|
14
14
|
static ofTypeOrExtension(analyzer: Analyzer, typeOrExtension: TypeOrExtension): TypeMemberLookup;
|
|
15
15
|
getNamedMembers(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.NamedTypeMember[];
|
|
16
16
|
getNamedMembersByName(name: Name, context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.NamedTypeMember[];
|
|
17
|
-
getOperators(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.Operator[];
|
|
18
|
-
getOperatorsByKind(kind: OperatorKind, context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.Operator[];
|
|
19
17
|
getConstructors(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.Constructor[];
|
|
20
18
|
getDestructors(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.Destructor[];
|
|
21
19
|
getIndexers(context: TypeMemberLookupContext | undefined, options?: TypeMemberLookupOptions): readonly types.Indexer[];
|
|
@@ -31,8 +29,6 @@ export declare class BoundTypeMemberLookup {
|
|
|
31
29
|
static ofTypeExtension(analyzer: Analyzer, typeExtension: TypeExtensionEntity, context: TypeMemberLookupContext | undefined, options: TypeMemberLookupOptions): BoundTypeMemberLookup;
|
|
32
30
|
getNamedMembers(): readonly types.NamedTypeMember[];
|
|
33
31
|
getNamedMembersByName(name: Name): readonly types.NamedTypeMember[];
|
|
34
|
-
getOperators(): readonly types.Operator[];
|
|
35
|
-
getOperatorsByKind(kind: OperatorKind): readonly types.Operator[];
|
|
36
32
|
getConstructors(): readonly types.Constructor[];
|
|
37
33
|
getDestructors(): readonly types.Destructor[];
|
|
38
34
|
getIndexers(): readonly types.Indexer[];
|
|
@@ -29,6 +29,6 @@ export declare class UserDefinableBinaryOperatorResolver {
|
|
|
29
29
|
private readonly diagnosticLocation;
|
|
30
30
|
private readonly diagnostics;
|
|
31
31
|
constructor(analyzer: Analyzer, left: tree.Expression, right: tree.Expression, operatorKind: BinaryOperatorKind, diagnosticLocation: NodeOrDiagnosticLocation, diagnostics: DiagnosticAcceptor | undefined);
|
|
32
|
-
resolve(): types.
|
|
32
|
+
resolve(): types.Method | undefined;
|
|
33
33
|
private chooseSuitableOperators;
|
|
34
34
|
}
|
|
@@ -17,7 +17,7 @@ export declare class UserDefinableUnaryOperatorResolver {
|
|
|
17
17
|
private readonly analyzer;
|
|
18
18
|
private readonly node;
|
|
19
19
|
private readonly diagnostics;
|
|
20
|
-
private get operatorKind();
|
|
21
20
|
constructor(analyzer: Analyzer, node: tree.PrefixUnaryExpression, diagnostics: DiagnosticAcceptor | undefined);
|
|
22
|
-
resolve(): types.
|
|
21
|
+
resolve(): types.Method | undefined;
|
|
22
|
+
private getOperatorKind;
|
|
23
23
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { Name } from '../../common/index.js';
|
|
2
|
-
import { OperatorKind } from '../../entities/OperatorKind.js';
|
|
3
2
|
import * as tree from '../../tree/index.js';
|
|
4
|
-
import * as types from '../../types/index.js';
|
|
5
3
|
import { Analyzer } from '../Analyzer.js';
|
|
6
4
|
import { TypeMemberLookupContext } from '../TypeMemberLookup.js';
|
|
7
5
|
import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
|
|
8
6
|
import { SemanticContext } from './SemanticContext.js';
|
|
9
|
-
import { NamedDeclarationLookupResult,
|
|
7
|
+
import { NamedDeclarationLookupResult, SemanticContextLookupState } from './SemanticContextBase.js';
|
|
10
8
|
import { SemanticContextWithParent } from './SemanticContextWithParent.js';
|
|
11
9
|
import { SemanticContextContainingTypeMember } from './TypeSemanticContext.js';
|
|
12
10
|
export declare class FieldWithInitializerSemanticContext extends SemanticContextWithParent {
|
|
@@ -22,7 +20,4 @@ export declare class FieldWithInitializerSemanticContext extends SemanticContext
|
|
|
22
20
|
getOwnTypesOrContainersWithTypesByName(_name: Name, _initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
|
|
23
21
|
getOwnNamedDeclarations(_initialContext: SemanticContext, _noInstanceMembers: boolean, _lookupState: SemanticContextLookupState): readonly NamedDeclaration[];
|
|
24
22
|
getOwnNamedDeclarationsByName(_name: Name, _initialContext: SemanticContext, _noInstanceMembers: boolean, _lookupResult: NamedDeclarationLookupResult): void;
|
|
25
|
-
getOwnOperators(_initialContext: SemanticContext, _noInstanceMembers: boolean, _lookupState: SemanticContextLookupState): readonly types.Operator[];
|
|
26
|
-
getOwnOperatorsByKind(_kind: OperatorKind, _initialContext: SemanticContext, _noInstanceMembers: boolean, _lookupResult: OperatorLookupResult): void;
|
|
27
|
-
getOwnOperatorsBySyntacticKind(_kind: tree.OperatorKind, _initialContext: SemanticContext, _noInstanceMembers: boolean, _lookupResult: OperatorLookupResult): void;
|
|
28
23
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Name } from '../../common/index.js';
|
|
2
|
-
import { ConstructorEntity,
|
|
2
|
+
import { ConstructorEntity, PackageEntity, ParameterEntity, TextTranslationEntity, TypeEntity, TypeEntityWithMembers, TypeExtensionEntity } from '../../entities/index.js';
|
|
3
3
|
import { SourceFile } from '../../project/SourceFile.js';
|
|
4
4
|
import * as tree from '../../tree/index.js';
|
|
5
5
|
import * as types from '../../types/index.js';
|
|
@@ -14,7 +14,6 @@ import { SemanticContext } from './SemanticContext.js';
|
|
|
14
14
|
export declare abstract class SemanticContextBase {
|
|
15
15
|
static readonly emptyTypesOrContainersWithTypes: readonly TypeOrContainerWithTypes[];
|
|
16
16
|
static readonly emptyNamedDeclarations: readonly NamedDeclaration[];
|
|
17
|
-
static readonly emptyOperators: readonly types.Operator[];
|
|
18
17
|
static readonly emptyTypeExtensions: readonly TypeExtensionEntity[];
|
|
19
18
|
abstract readonly outer: SemanticContext | undefined;
|
|
20
19
|
protected abstract readonly asContext: SemanticContext;
|
|
@@ -28,9 +27,6 @@ export declare abstract class SemanticContextBase {
|
|
|
28
27
|
abstract getOwnTypesOrContainersWithTypesByName(name: Name, initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
|
|
29
28
|
abstract getOwnNamedDeclarations(initialContext: SemanticContext, noInstanceMembers: boolean, lookupState: SemanticContextLookupState): readonly NamedDeclaration[];
|
|
30
29
|
abstract getOwnNamedDeclarationsByName(name: Name, initialContext: SemanticContext, noInstanceMembers: boolean, lookupResult: NamedDeclarationLookupResult): void;
|
|
31
|
-
abstract getOwnOperators(initialContext: SemanticContext, noInstanceMembers: boolean, lookupState: SemanticContextLookupState): readonly types.Operator[];
|
|
32
|
-
abstract getOwnOperatorsByKind(kind: OperatorKind, initialContext: SemanticContext, noInstanceMembers: boolean, lookupResult: OperatorLookupResult): void;
|
|
33
|
-
abstract getOwnOperatorsBySyntacticKind(kind: tree.OperatorKind, initialContext: SemanticContext, noInstanceMembers: boolean, lookupResult: OperatorLookupResult): void;
|
|
34
30
|
getContainingSourceFile(): SourceFile;
|
|
35
31
|
getContainingPackage(): PackageEntity;
|
|
36
32
|
getDiagnosticArgumentFactory(): DiagnosticArgumentFactory;
|
|
@@ -39,15 +35,12 @@ export declare abstract class SemanticContextBase {
|
|
|
39
35
|
getTypesOrContainersWithTypesByName(name: Name): readonly TypeOrContainerWithTypes[];
|
|
40
36
|
getNamedDeclarations(noInstanceMembers?: boolean): readonly NamedDeclaration[];
|
|
41
37
|
getNamedDeclarationsByName(name: Name, noInstanceMembers?: boolean): NamedDeclarationLookupResult;
|
|
42
|
-
getOperators(noInstanceMembers?: boolean): readonly types.Operator[];
|
|
43
|
-
getOperatorsByKind(kind: OperatorKind, noInstanceMembers?: boolean): OperatorLookupResult;
|
|
44
|
-
getOperatorsBySyntacticKind(kind: tree.OperatorKind, noInstanceMembers?: boolean): OperatorLookupResult;
|
|
45
38
|
getTypeExtensionsByType(type: TypeEntity): readonly TypeExtensionEntity[];
|
|
46
39
|
getTextTranslationEntityByTextKey(key: TextKey): readonly TextTranslationEntity[];
|
|
47
40
|
private semanticContexts;
|
|
48
41
|
private getSourceFileContext;
|
|
49
42
|
}
|
|
50
|
-
export type SubprogramInfo = SubprogramInfo.Function | SubprogramInfo.
|
|
43
|
+
export type SubprogramInfo = SubprogramInfo.Function | SubprogramInfo.Constructor | SubprogramInfo.Destructor | SubprogramInfo.Getter | SubprogramInfo.Setter | SubprogramInfo.PackageConstructor | SubprogramInfo.PackageEntryPoint | SubprogramInfo.FunctionLiteral | SubprogramInfo.TextTranslationFunction;
|
|
51
44
|
export declare namespace SubprogramInfo {
|
|
52
45
|
export class Function implements ISubprogramInfo {
|
|
53
46
|
readonly kind = "function";
|
|
@@ -60,16 +53,6 @@ export declare namespace SubprogramInfo {
|
|
|
60
53
|
getNode(): FunctionDeclaration;
|
|
61
54
|
private getEntity;
|
|
62
55
|
}
|
|
63
|
-
export class Operator implements ISubprogramInfo {
|
|
64
|
-
readonly kind = "operator";
|
|
65
|
-
private readonly analyzer;
|
|
66
|
-
private readonly node;
|
|
67
|
-
constructor(analyzer: Analyzer, node: tree.OperatorDeclaration);
|
|
68
|
-
getReturnType(): types.Type | undefined;
|
|
69
|
-
isGenerator(): boolean;
|
|
70
|
-
allowsAsyncCalls(): boolean;
|
|
71
|
-
getNode(): tree.OperatorDeclaration;
|
|
72
|
-
}
|
|
73
56
|
export class Constructor implements ISubprogramInfo {
|
|
74
57
|
readonly kind = "constructor";
|
|
75
58
|
private readonly analyzer;
|
|
@@ -215,14 +198,3 @@ export declare class NamedDeclarationLookupResult {
|
|
|
215
198
|
get objectParameter(): ParameterEntity | undefined;
|
|
216
199
|
setDeclarations(declarations: readonly NamedDeclaration[], objectParameter: ParameterEntity | undefined): void;
|
|
217
200
|
}
|
|
218
|
-
export declare class OperatorLookupResult {
|
|
219
|
-
hasSearchedInObjectVariable: boolean;
|
|
220
|
-
private operators_;
|
|
221
|
-
private objectParameter_;
|
|
222
|
-
get operators(): readonly types.Operator[];
|
|
223
|
-
/**
|
|
224
|
-
* Параметр "объект", в типе которого были найден операторы.
|
|
225
|
-
*/
|
|
226
|
-
get objectParameter(): ParameterEntity | undefined;
|
|
227
|
-
setOperators(declarations: readonly types.Operator[], objectParameter: ParameterEntity | undefined): void;
|
|
228
|
-
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as tree from '../../tree/index.js';
|
|
2
2
|
import { Analyzer } from '../Analyzer.js';
|
|
3
3
|
import { FunctionDeclaration, FunctionTypeDeclaration, IndexedElementAccessorDeclaration, PackageTypeDeclaration, RegularOrBlockFunctionLiteral, SubprogramDeclarationOrLiteral } from '../NodeTypeUtils.js';
|
|
4
|
-
import { CatchClauseSemanticContext, ConstructorSemanticContext, DestructorSemanticContext, ForStatementSemanticContext, FunctionLiteralSemanticContext, FunctionSemanticContext, IndexedElementAccessorSemanticContext,
|
|
4
|
+
import { CatchClauseSemanticContext, ConstructorSemanticContext, DestructorSemanticContext, ForStatementSemanticContext, FunctionLiteralSemanticContext, FunctionSemanticContext, IndexedElementAccessorSemanticContext, OutermostSemanticContextOfSubprogram, OutermostSemanticContextOfType, PackageConstructorSemanticContext, PackageEntryPointSemanticContext, ParametersOfFunctionTypeSemanticContext, SemanticContext, SemanticContextContainingTypeMember, SourceFileSemanticContext, SpecialLocalDeclarationSemanticContext, StatementBlockSemanticContext, SubprogramParameterListSemanticContext, SubprogramTypeParameterSemanticContext, TextTranslationFunctionDeclarationSemanticContext, TypeBodySemanticContext, TypeDeclarationCreatingSemanticContext, TypeDeclarationWithMemberBlock, TypeExtensionBodySemanticContext, TypeParametersOfTypeSemanticContext, VariableAccessorDeclaration, VariableAccessorSemanticContext } from '../semantic-context/index.js';
|
|
5
5
|
export declare class SemanticContextBuilder {
|
|
6
6
|
private readonly analyzer;
|
|
7
7
|
private readonly sourceFileContexts;
|
|
8
8
|
private readonly indexedElementAccessorContexts;
|
|
9
|
-
private readonly operatorContexts;
|
|
10
9
|
private readonly fieldWithInitializerContexts;
|
|
11
10
|
private readonly forStatementContexts;
|
|
12
11
|
private readonly catchClauseSemanticContexts;
|
|
@@ -39,8 +38,6 @@ export declare class SemanticContextBuilder {
|
|
|
39
38
|
ofFunctionDeclarationParameters(node: FunctionDeclaration): SubprogramParameterListSemanticContext;
|
|
40
39
|
ofFunctionDeclarationTypeParameters(node: FunctionDeclaration, typeParameterClause: tree.TypeParameterClause): SubprogramTypeParameterSemanticContext;
|
|
41
40
|
outermostSemanticContextOfFunctionDeclaration(node: FunctionDeclaration): FunctionSemanticContext;
|
|
42
|
-
ofOperatorDeclarationParameters(node: tree.OperatorDeclaration): SubprogramParameterListSemanticContext;
|
|
43
|
-
outermostSemanticContextOfOperatorDeclaration(node: tree.OperatorDeclaration): OperatorSemanticContext;
|
|
44
41
|
ofTypeDeclarationMemberBlock(typeDeclaration: TypeDeclarationWithMemberBlock, memberBlock: tree.TypeMemberDeclarationBlock): TypeBodySemanticContext;
|
|
45
42
|
ofFunctionTypeDeclarationParameters(node: FunctionTypeDeclaration): ParametersOfFunctionTypeSemanticContext;
|
|
46
43
|
outermostSemanticContextOfTypeDeclaration(node: TypeDeclarationCreatingSemanticContext): OutermostSemanticContextOfType;
|
|
@@ -75,7 +72,6 @@ export declare class SemanticContextBuilder {
|
|
|
75
72
|
private ofChildOfTypeDeclarationWithMemberBlock2;
|
|
76
73
|
private ofChildOfAnonymousFunctionTypeDeclaration;
|
|
77
74
|
private ofChildOfFunctionLiteral;
|
|
78
|
-
private ofOperatorDeclarationChild;
|
|
79
75
|
private ofConstructorDeclarationChild;
|
|
80
76
|
private ofDestructorDeclarationChild;
|
|
81
77
|
private ofIndexedElementGetterDeclarationChild;
|