@artel/artc 0.6.26039 → 0.9.26001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Cli.js +3 -3
- package/build/api/Api.js +19 -15
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +11426 -5066
- package/build/{chunk-LTJPPRSR.js → chunk-FLMCFMMG.js} +87218 -50777
- package/build/{chunk-AEW4TILW.js → chunk-V2TFXOVJ.js} +1 -1
- package/build/{chunk-5VVFNKOH.js → chunk-XMOVE7NP.js} +2 -2
- package/build/types/analysis/Analyzer.d.ts +6 -1
- package/build/types/analysis/TypeMemberLookup.d.ts +3 -1
- package/build/types/analysis/WellKnownDeclarations.d.ts +54 -0
- package/build/types/analysis/a/Analyzer.d.ts +10 -10
- package/build/types/analysis/a/IdentifierExpressionMeaning.d.ts +3 -3
- package/build/types/analysis/a/MemberAccessExpressionMeaning.d.ts +3 -3
- package/build/types/analysis/a/ModifierValidator.d.ts +3 -2
- package/build/types/analysis/a/ResolvedTranslationPackage.d.ts +2 -1
- package/build/types/analysis/a/SourceFileAnalyzer.d.ts +1 -1
- package/build/types/analysis/a/SourcePackageMembersCreator.d.ts +1 -2
- package/build/types/analysis/a/TreeQuery.d.ts +1 -2
- package/build/types/analysis/a/TypeMemberLookup.d.ts +3 -1
- package/build/types/analysis/a/semantic-context/FieldWithInitializerSemanticContext.d.ts +3 -3
- package/build/types/analysis/a/semantic-context/SemanticContext.d.ts +2 -2
- package/build/types/analysis/a/semantic-context/SemanticContextBuilder.d.ts +10 -12
- package/build/types/analysis/a/semantic-context/SpecialLocalDeclarationsBuilder.d.ts +0 -1
- package/build/types/analysis/a/semantic-context/SubprogramBodyAndParametersSemanticContext.d.ts +5 -4
- package/build/types/analysis/a/semantic-context/SubprogramSemanticContext.d.ts +11 -10
- package/build/types/analysis/a/semantic-context/TypeSemanticContext.d.ts +13 -13
- package/build/types/analysis/m/Analyzer.d.ts +425 -1
- package/build/types/analysis/m/ArgumentToParameterMatchResult.d.ts +23 -0
- package/build/types/analysis/m/ArgumentsToParametersMatcher.d.ts +40 -0
- package/build/types/analysis/m/BaseExpressionMeaning.d.ts +25 -0
- package/build/types/analysis/m/CallExpressionMeaning.d.ts +72 -0
- package/build/types/analysis/m/ConstructorCallResolver.d.ts +24 -0
- package/build/types/analysis/m/DeclarationsUsageCounter.d.ts +12 -0
- package/build/types/analysis/m/DereferenceExpressionMeaning.d.ts +28 -0
- package/build/types/analysis/m/ExpressionAnalysisOptions.d.ts +21 -0
- package/build/types/analysis/m/FunctionAccessResolver.d.ts +19 -0
- package/build/types/analysis/m/IdentifierExpressionMeaning.d.ts +137 -0
- package/build/types/analysis/m/IndexedAccessExpressionMeaning.d.ts +32 -0
- package/build/types/analysis/m/InstanceFieldsInitializationValidator.d.ts +18 -0
- package/build/types/analysis/m/MemberAccessExpressionMeaning.d.ts +137 -0
- package/build/types/analysis/m/ModifierFlags.d.ts +20 -0
- package/build/types/analysis/m/NamedTypeResolver.d.ts +44 -0
- package/build/types/analysis/m/NamedTypeSpecifierResolver.d.ts +19 -0
- package/build/types/analysis/m/ObjectExpressionMeaning.d.ts +29 -0
- package/build/types/analysis/m/OverloadResolver.d.ts +104 -0
- package/build/types/analysis/m/OwnAndBaseConstructorCallsChecker.d.ts +36 -0
- package/build/types/analysis/m/PackageAndStaticVariablesInitializationValidator.d.ts +17 -0
- package/build/types/analysis/m/ReachabilityChecker.d.ts +27 -0
- package/build/types/analysis/m/ReductionSourceMemberFinder.d.ts +17 -0
- package/build/types/analysis/m/ReservedNameDictionary.d.ts +15 -0
- package/build/types/analysis/m/ResolvedTranslationPackage.d.ts +68 -0
- package/build/types/analysis/m/ReturnTypeInferrer.d.ts +13 -0
- package/build/types/analysis/m/SourceFileAnalyzer.d.ts +131 -0
- package/build/types/analysis/m/SourcePackageMembersCreator.d.ts +7 -0
- package/build/types/analysis/m/SourceTypeMembersCreator.d.ts +9 -0
- package/build/types/analysis/m/StaticDeclarationMeaning.d.ts +32 -0
- package/build/types/analysis/m/SyntacticAccessKind.d.ts +6 -0
- package/build/types/analysis/m/TagMeaning.d.ts +70 -0
- package/build/types/analysis/m/TextIdentity.d.ts +7 -0
- package/build/types/analysis/m/TranslatedEntityNameConflictsValidator.d.ts +28 -0
- package/build/types/analysis/m/TreeQuery.d.ts +15 -0
- package/build/types/analysis/m/TypeArgumentInferrer.d.ts +52 -0
- package/build/types/analysis/m/TypeInferrer.d.ts +11 -0
- package/build/types/analysis/m/TypeMemberLookup.d.ts +4 -1
- package/build/types/analysis/m/TypeNarrower.d.ts +31 -0
- package/build/types/analysis/m/TypeOverloadResolver.d.ts +9 -0
- package/build/types/analysis/m/UserDefinableBinaryOperatorResolver.d.ts +34 -0
- package/build/types/analysis/m/UserDefinableUnaryOperatorResolver.d.ts +23 -0
- package/build/types/analysis/m/VariableIsAssignedChecker.d.ts +11 -0
- package/build/types/analysis/m/VariableIsNotAssignedChecker.d.ts +12 -0
- package/build/types/analysis/m/control-flow/GraphBuilder.d.ts +52 -0
- package/build/types/analysis/m/control-flow/GraphVisualizer.d.ts +12 -0
- package/build/types/analysis/m/control-flow/NarrowableExpression.d.ts +5 -0
- package/build/types/analysis/m/control-flow/NarrowableReference.d.ts +72 -0
- package/build/types/analysis/m/control-flow/Nodes.d.ts +112 -0
- package/build/types/analysis/m/control-flow/index.d.ts +5 -0
- package/build/types/analysis/m/semantic-context/Declarations.d.ts +94 -0
- package/build/types/analysis/m/semantic-context/FieldWithInitializerSemanticContext.d.ts +28 -0
- package/build/types/analysis/m/semantic-context/SemanticContext.d.ts +14 -0
- package/build/types/analysis/m/semantic-context/SemanticContextBase.d.ts +190 -0
- package/build/types/analysis/m/semantic-context/SemanticContextBuilder.d.ts +69 -0
- package/build/types/analysis/m/semantic-context/SemanticContextValidatingNameConflicts.d.ts +51 -0
- package/build/types/analysis/m/semantic-context/SemanticContextWithParent.d.ts +12 -0
- package/build/types/analysis/m/semantic-context/SourceFileSemanticContext.d.ts +63 -0
- package/build/types/analysis/m/semantic-context/StaticDeclarationSemanticContext.d.ts +26 -0
- package/build/types/analysis/m/semantic-context/SubprogramBodyAndParametersSemanticContext.d.ts +108 -0
- package/build/types/analysis/m/semantic-context/SubprogramSemanticContext.d.ts +92 -0
- package/build/types/analysis/m/semantic-context/TypeSemanticContext.d.ts +93 -0
- package/build/types/analysis/m/semantic-context/index.d.ts +10 -0
- package/build/types/common/LocalizationHelper.d.ts +3 -1
- package/build/types/common/LocalizationHelperA.d.ts +0 -2
- package/build/types/common/LocalizationHelperM.d.ts +13 -0
- package/build/types/common/Name.d.ts +1 -1
- package/build/types/common/index.d.ts +1 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +211 -192
- package/build/types/diagnostic/TokenDiagnosticM.d.ts +2 -0
- package/build/types/emitter/EmitPhaseName.d.ts +2 -2
- package/build/types/emitter/EmitterContext.d.ts +4 -4
- package/build/types/emitter/Entities.d.ts +4 -2
- package/build/types/emitter/IrBuilderM.d.ts +124 -0
- package/build/types/emitter/IrFactory.d.ts +2 -2
- package/build/types/entities/Entity.d.ts +8 -5
- package/build/types/entities/EntityLocalizationContext.d.ts +3 -2
- package/build/types/entities/OperatorKind.d.ts +13 -18
- package/build/types/entities/Translation.d.ts +4 -3
- package/build/types/entities/interfaces/AliasTypeEntity.d.ts +4 -1
- package/build/types/entities/interfaces/DereferenceOperatorEntity.d.ts +3 -1
- package/build/types/entities/interfaces/FunctionEntity.d.ts +3 -1
- package/build/types/entities/interfaces/FunctionTypeEntity.d.ts +3 -1
- package/build/types/entities/interfaces/IndexerEntity.d.ts +4 -1
- package/build/types/entities/interfaces/PackageAliasEntity.d.ts +4 -1
- package/build/types/entities/interfaces/PackageEntity.d.ts +2 -1
- package/build/types/entities/interfaces/ReducedTypeEntity.d.ts +3 -1
- package/build/types/entities/interfaces/StructuredTypeEntity.d.ts +9 -2
- package/build/types/entities/interfaces/TextTranslationEntity.d.ts +4 -1
- package/build/types/entities/interfaces/TypeExtensionEntity.d.ts +4 -1
- package/build/types/entities/interfaces/TypeParameterEntity.d.ts +7 -3
- package/build/types/entities/interfaces/VariableEntity.d.ts +3 -2
- package/build/types/entities/interfaces/VariantTypeEntity.d.ts +3 -1
- package/build/types/entities/interfaces/m/ConstructorEntityM.d.ts +10 -0
- package/build/types/entities/interfaces/m/DestructorEntityM.d.ts +8 -0
- package/build/types/entities/interfaces/m/index.d.ts +2 -0
- package/build/types/entities/source/a/SourceFunctionEntity.d.ts +1 -1
- package/build/types/entities/source/a/SourcePackageEntity.d.ts +2 -1
- package/build/types/entities/source/a/SourceStructuredTypeEntity.d.ts +3 -5
- package/build/types/entities/source/m/SourceAliasTypeEntity.d.ts +32 -0
- package/build/types/entities/source/m/SourceConstructorEntity.d.ts +40 -0
- package/build/types/entities/source/m/SourceDestructorEntity.d.ts +38 -0
- package/build/types/entities/source/m/SourceFunctionEntity.d.ts +252 -0
- package/build/types/entities/source/m/SourceFunctionTypeEntity.d.ts +35 -0
- package/build/types/entities/source/m/SourceGetterEntity.d.ts +122 -0
- package/build/types/entities/source/m/SourceIndexerEntity.d.ts +36 -0
- package/build/types/entities/source/m/SourcePackageAliasEntity.d.ts +22 -0
- package/build/types/entities/source/m/SourcePackageEntity.d.ts +68 -0
- package/build/types/entities/source/m/SourceSetterEntity.d.ts +122 -0
- package/build/types/entities/source/m/SourceStructuredTypeEntity.d.ts +111 -0
- package/build/types/entities/source/m/SourceTextTranslationEntity.d.ts +29 -0
- package/build/types/entities/source/m/SourceTypeParameterEntity.d.ts +30 -0
- package/build/types/entities/source/m/SourceVariableEntity.d.ts +447 -0
- package/build/types/entities/source/m/SourceVariantTypeEntity.d.ts +38 -0
- package/build/types/entities/source/m/index.d.ts +15 -0
- package/build/types/entities/translated/TranslatedPackageEntity.d.ts +2 -1
- package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +33 -1
- package/build/types/entities/translated/source/a/SourceTranslatedPackageStructuredTypeEntity.d.ts +8 -2
- package/build/types/entities/translated/source/m/SourceTranslatedAliasTypeEntity.d.ts +14 -0
- package/build/types/entities/translated/source/m/SourceTranslatedDestructorEntity.d.ts +12 -0
- package/build/types/entities/translated/source/m/SourceTranslatedFunctionEntity.d.ts +24 -0
- package/build/types/entities/translated/source/m/SourceTranslatedFunctionTypeEntity.d.ts +13 -0
- package/build/types/entities/translated/source/m/SourceTranslatedIndexerEntity.d.ts +12 -0
- package/build/types/entities/translated/source/m/SourceTranslatedPackageEntity.d.ts +19 -0
- package/build/types/entities/translated/source/m/SourceTranslatedPackageStructuredTypeEntity.d.ts +26 -0
- package/build/types/entities/translated/source/m/SourceTranslatedPackageVariantTypeEntity.d.ts +14 -0
- package/build/types/entities/translated/source/m/SourceTranslatedReducedTypeEntity.d.ts +14 -0
- package/build/types/entities/translated/source/m/index.d.ts +9 -0
- package/build/types/parser/a/KeywordDictionary.d.ts +2 -3
- package/build/types/parser/a/Parser.d.ts +2 -2
- package/build/types/parser/m/ConvertTokenKind.d.ts +3 -0
- package/build/types/parser/m/KeywordDictionary.d.ts +33 -0
- package/build/types/parser/m/Parser.d.ts +7 -0
- package/build/types/parser/m/Scanner.d.ts +56 -0
- package/build/types/parser/m/TokenKind.d.ts +81 -0
- package/build/types/parser/m/TriviaInterner.d.ts +8 -0
- package/build/types/project/SourceFile.d.ts +5 -6
- package/build/types/services/LanguageServer.d.ts +23 -12
- package/build/types/services/a/NodeSemanticInfo.d.ts +2 -2
- package/build/types/services/common/WorkspaceItemsService.d.ts +1 -0
- package/build/types/services/common/completion/Types.d.ts +8 -2
- package/build/types/services/common/display/DisplayService.d.ts +3 -0
- package/build/types/services/common/display/Types.d.ts +2 -2
- package/build/types/services/m/CodeActionsService.d.ts +10 -0
- package/build/types/services/m/CompletionService.d.ts +60 -0
- package/build/types/services/m/DefinitionService.d.ts +11 -0
- package/build/types/services/m/DisplayService.d.ts +52 -0
- package/build/types/services/m/EvaluatableExpressionService.d.ts +10 -0
- package/build/types/services/m/HoverService.d.ts +11 -0
- package/build/types/services/m/NodeSemanticInfo.d.ts +46 -0
- package/build/types/services/m/RenameService.d.ts +11 -0
- package/build/types/services/m/SelectionRangeService.d.ts +7 -0
- package/build/types/services/m/SemanticTokensService.d.ts +11 -0
- package/build/types/services/m/SourceFileItemsService.d.ts +10 -0
- package/build/types/services/m/TranslationService.d.ts +23 -0
- package/build/types/services/m/TranslationsGenerationService.d.ts +7 -0
- package/build/types/services/m/TreeUtils.d.ts +58 -0
- package/build/types/services/m/references/DefinitionInfoFinder.d.ts +6 -0
- package/build/types/services/m/references/ReferencesFinder.d.ts +7 -0
- package/build/types/services/m/signature-help/ParametersSignatureHelpProvider.d.ts +15 -0
- package/build/types/services/m/signature-help/SignatureHelpService.d.ts +6 -0
- package/build/types/services/m/signature-help/SignatureWithParameters.d.ts +94 -0
- package/build/types/services/m/signature-help/TypeParameterSignatureHelpProvider.d.ts +21 -0
- package/build/types/services/m/signature-help/utils.d.ts +9 -0
- package/build/types/tree/a/KeywordKind.d.ts +1 -3
- package/build/types/tree/a/NodeKind.d.ts +113 -114
- package/build/types/tree/a/Nodes.d.ts +6 -5
- package/build/types/tree/a/OperatorKind.d.ts +5 -0
- package/build/types/tree/a/Types.d.ts +9 -4
- package/build/types/tree/m/BaseNode.d.ts +8 -40
- package/build/types/tree/m/KeywordFlags.d.ts +4 -0
- package/build/types/tree/m/KeywordKind.d.ts +40 -0
- package/build/types/tree/m/NodeKind.d.ts +147 -2
- package/build/types/tree/m/Nodes.d.ts +2064 -9
- package/build/types/tree/m/NodesDebug.d.ts +9 -0
- package/build/types/tree/m/OperatorKind.d.ts +39 -0
- package/build/types/tree/m/SyntaxToCode.d.ts +107 -0
- package/build/types/tree/m/Token.d.ts +46 -0
- package/build/types/tree/m/TokenFlags.d.ts +12 -0
- package/build/types/tree/m/TokenKind.d.ts +61 -60
- package/build/types/tree/m/TreeTraversal.d.ts +18 -0
- package/build/types/tree/m/Types.d.ts +46 -0
- package/build/types/tree/m/Utils.d.ts +7 -0
- package/build/types/tree/m/index.d.ts +9 -0
- package/build/types/types/StandardTypes.d.ts +2 -0
- package/package.json +2 -2
- /package/build/types/diagnostic/{TokenDiagnostic.d.ts → TokenDiagnosticA.d.ts} +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { AccessKind } from '../../common/index.js';
|
|
2
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
3
|
+
import { NamedTypeEntity } from '../../entities/index.js';
|
|
4
|
+
import * as tree from '../../tree/m/index.js';
|
|
5
|
+
import * as types from '../../types/index.js';
|
|
6
|
+
import { AccessedFunction, NotSubstitutedAccessedFunction } from '../AccessedFunction.js';
|
|
7
|
+
import { Analyzer } from './Analyzer.js';
|
|
8
|
+
import { ExpressionAnalysisOptions } from './ExpressionAnalysisOptions.js';
|
|
9
|
+
export declare class Resolver {
|
|
10
|
+
private readonly analyzer;
|
|
11
|
+
private readonly node;
|
|
12
|
+
private readonly analysisOptions;
|
|
13
|
+
private readonly diagnostics;
|
|
14
|
+
constructor(analyzer: Analyzer, node: tree.CallExpression, analysisOptions: ExpressionAnalysisOptions | undefined, diagnostics: DiagnosticAcceptor | undefined);
|
|
15
|
+
resolve(): Meaning;
|
|
16
|
+
private checkExpressionDenotesType;
|
|
17
|
+
private checkExpressionDenotesFunction;
|
|
18
|
+
private resolveFunctionCallExpression;
|
|
19
|
+
private getBaseTypeEntity;
|
|
20
|
+
private resolveConstructorCallOrVariantAccessExpression;
|
|
21
|
+
private resolveObjectFunctionCallExpression;
|
|
22
|
+
}
|
|
23
|
+
export type Meaning = Meaning_functionCall | Meaning_objectFunctionCall | Meaning_constructorCall | Meaning_variantValueAccess | Meaning_unresolved;
|
|
24
|
+
export declare class Meaning_functionCall {
|
|
25
|
+
readonly candidates: readonly NotSubstitutedAccessedFunction[];
|
|
26
|
+
readonly suitableOrSingleFunction: AccessedFunction | undefined;
|
|
27
|
+
readonly isOwnConstructorCall: boolean;
|
|
28
|
+
readonly isBaseConstructorCall: boolean;
|
|
29
|
+
readonly isAsFunctionCall: boolean;
|
|
30
|
+
readonly isIsFunctionCall: boolean;
|
|
31
|
+
readonly kind = "function-call";
|
|
32
|
+
constructor(candidates: readonly NotSubstitutedAccessedFunction[], suitableOrSingleFunction: AccessedFunction | undefined, isOwnConstructorCall: boolean, isBaseConstructorCall: boolean, isAsFunctionCall: boolean, isIsFunctionCall: boolean);
|
|
33
|
+
}
|
|
34
|
+
export declare class Meaning_objectFunctionCall {
|
|
35
|
+
readonly type: types.FunctionType;
|
|
36
|
+
readonly kind = "object-function-call";
|
|
37
|
+
constructor(type: types.FunctionType);
|
|
38
|
+
}
|
|
39
|
+
export declare class Meaning_constructorCall {
|
|
40
|
+
/**
|
|
41
|
+
* Тип объекта, получаемого в результате вызова конструктора.
|
|
42
|
+
*
|
|
43
|
+
* При поиске конструктора в типе-псевдониме конструктор может быть найден в оригинальном типе. В таком случае тип,
|
|
44
|
+
* создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
|
|
45
|
+
* с ним совместим.
|
|
46
|
+
*/
|
|
47
|
+
readonly type: types.Type | undefined;
|
|
48
|
+
readonly typeEntity: NamedTypeEntity | undefined;
|
|
49
|
+
readonly candidates: readonly types.Method[];
|
|
50
|
+
readonly suitableOrSingleConstructor: types.Method | undefined;
|
|
51
|
+
readonly kind = "constructor-call";
|
|
52
|
+
constructor(
|
|
53
|
+
/**
|
|
54
|
+
* Тип объекта, получаемого в результате вызова конструктора.
|
|
55
|
+
*
|
|
56
|
+
* При поиске конструктора в типе-псевдониме конструктор может быть найден в оригинальном типе. В таком случае тип,
|
|
57
|
+
* создаваемый найденным конструктором, будет отличаться от результирующего типа, хранимого в этом поле, но будет
|
|
58
|
+
* с ним совместим.
|
|
59
|
+
*/
|
|
60
|
+
type: types.Type | undefined, typeEntity: NamedTypeEntity | undefined, candidates: readonly types.Method[], suitableOrSingleConstructor: types.Method | undefined);
|
|
61
|
+
}
|
|
62
|
+
export declare class Meaning_variantValueAccess {
|
|
63
|
+
readonly suitableTypes: readonly types.Type[];
|
|
64
|
+
readonly type: types.Type;
|
|
65
|
+
readonly field: types.Field;
|
|
66
|
+
readonly accessKind: AccessKind;
|
|
67
|
+
readonly kind = "variant-value-access";
|
|
68
|
+
constructor(suitableTypes: readonly types.Type[], type: types.Type, field: types.Field, accessKind: AccessKind);
|
|
69
|
+
}
|
|
70
|
+
export declare class Meaning_unresolved {
|
|
71
|
+
readonly kind = "unresolved";
|
|
72
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DiagnosticAcceptorWithArgumentFactory } from '../../diagnostic/Diagnostic.js';
|
|
2
|
+
import { NamedTypeEntity } from '../../entities/index.js';
|
|
3
|
+
import * as tree from '../../tree/m/index.js';
|
|
4
|
+
import * as types from '../../types/index.js';
|
|
5
|
+
import { NodeOrDiagnosticLocation } from '../NodeOrDiagnosticLocation.js';
|
|
6
|
+
import { TypeMemberLookupContext } from '../TypeMemberLookup.js';
|
|
7
|
+
import { Analyzer } from './Analyzer.js';
|
|
8
|
+
import { ExpressionAnalysisOptions } from './ExpressionAnalysisOptions.js';
|
|
9
|
+
export declare class Resolver {
|
|
10
|
+
static resolve(analyzer: Analyzer, candidates: readonly types.Method[], argumentList: tree.ArgumentList | undefined, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, diagnosticLocation: NodeOrDiagnosticLocation | undefined): readonly types.Method[];
|
|
11
|
+
static resolveByNamedTypes(analyzer: Analyzer, typeEntities: readonly NamedTypeEntity[], argumentList: tree.ArgumentList | undefined, typeArgumentClause: tree.TypeArgumentClause | undefined, analysisOptions: ExpressionAnalysisOptions, typeMemberLookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, diagnosticLocation: NodeOrDiagnosticLocation | undefined): ResolutionResult;
|
|
12
|
+
private static typeCanBeConstructed;
|
|
13
|
+
}
|
|
14
|
+
export declare class ResolutionResult {
|
|
15
|
+
readonly candidates: readonly types.Method[];
|
|
16
|
+
readonly suitableConstructors: readonly types.Method[];
|
|
17
|
+
readonly typeEntity: NamedTypeEntity | undefined;
|
|
18
|
+
readonly type: types.Type | undefined;
|
|
19
|
+
readonly singleNotSuitableSubstitutedCandidate: types.Method | undefined;
|
|
20
|
+
private static empty_;
|
|
21
|
+
static get empty(): ResolutionResult;
|
|
22
|
+
get suitableOrSingleConstructor(): types.Method | undefined;
|
|
23
|
+
constructor(candidates: readonly types.Method[], suitableConstructors: readonly types.Method[], typeEntity: NamedTypeEntity | undefined, type: types.Type | undefined, singleNotSuitableSubstitutedCandidate: types.Method | undefined);
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TaskController } from '../../common/index.js';
|
|
2
|
+
import * as tree from '../../tree/m/index.js';
|
|
3
|
+
import { DeclarationsUsageMap } from '../DeclarationsUsageMap.js';
|
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
|
5
|
+
export declare class DeclarationsUsageCounter {
|
|
6
|
+
private readonly analyzer;
|
|
7
|
+
private readonly sourceFile;
|
|
8
|
+
private readonly usageInfoByEntity;
|
|
9
|
+
constructor(analyzer: Analyzer, sourceFile: tree.SourceFile);
|
|
10
|
+
count(taskController: TaskController): Promise<DeclarationsUsageMap>;
|
|
11
|
+
private recordUsage;
|
|
12
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
2
|
+
import { DereferenceExpression } from '../../tree/m/index.js';
|
|
3
|
+
import * as types from '../../types/index.js';
|
|
4
|
+
import { ComputedAccess } from '../ComputedAccess.js';
|
|
5
|
+
import { Analyzer } from './Analyzer.js';
|
|
6
|
+
export declare class Resolver {
|
|
7
|
+
private readonly analyzer;
|
|
8
|
+
private readonly node;
|
|
9
|
+
private readonly diagnostics;
|
|
10
|
+
private readonly semanticContext_;
|
|
11
|
+
private get semanticContext();
|
|
12
|
+
constructor(analyzer: Analyzer, node: DereferenceExpression, diagnostics: DiagnosticAcceptor | undefined);
|
|
13
|
+
resolve(): Meaning;
|
|
14
|
+
private createComputedAccess;
|
|
15
|
+
private getAccessibleDereferenceOperatorGetter;
|
|
16
|
+
private getAccessibleDereferenceOperatorSetter;
|
|
17
|
+
}
|
|
18
|
+
export type Meaning = Meaning_resolved | Meaning_unresolved;
|
|
19
|
+
declare class Meaning_resolved {
|
|
20
|
+
readonly operator: types.DereferenceOperator;
|
|
21
|
+
readonly access: ComputedAccess;
|
|
22
|
+
readonly kind = "resolved";
|
|
23
|
+
constructor(operator: types.DereferenceOperator, access: ComputedAccess);
|
|
24
|
+
}
|
|
25
|
+
declare class Meaning_unresolved {
|
|
26
|
+
readonly kind = "unresolved";
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as types from '../../types/index.js';
|
|
2
|
+
export declare class ExpressionAnalysisOptions {
|
|
3
|
+
readonly targetType: types.Type | undefined;
|
|
4
|
+
/**
|
|
5
|
+
* Определяет, можно ли кэшировать результат анализа выражений, если результат зависит от целевого типа. Результат
|
|
6
|
+
* анализа, который не зависит от целевого типа, можно кэшировать всегда.
|
|
7
|
+
*/
|
|
8
|
+
readonly allowCaching: boolean;
|
|
9
|
+
readonly isResolvingOverload: boolean;
|
|
10
|
+
constructor(targetType: types.Type | undefined,
|
|
11
|
+
/**
|
|
12
|
+
* Определяет, можно ли кэшировать результат анализа выражений, если результат зависит от целевого типа. Результат
|
|
13
|
+
* анализа, который не зависит от целевого типа, можно кэшировать всегда.
|
|
14
|
+
*/
|
|
15
|
+
allowCaching: boolean, isResolvingOverload: boolean);
|
|
16
|
+
static withTargetType(options: ExpressionAnalysisOptions | undefined, targetType: types.Type | undefined): ExpressionAnalysisOptions;
|
|
17
|
+
withTargetType(targetType: types.Type | undefined): ExpressionAnalysisOptions;
|
|
18
|
+
withAllowCaching(allowCaching: boolean): ExpressionAnalysisOptions;
|
|
19
|
+
withIsResolvingOverload(isResolvingOverload: boolean): ExpressionAnalysisOptions;
|
|
20
|
+
withTargetTypeAndAllowCaching(targetType: types.Type | undefined, allowCaching: boolean): ExpressionAnalysisOptions;
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DiagnosticAcceptorWithArgumentFactory } from '../../diagnostic/Diagnostic.js';
|
|
2
|
+
import * as tree from '../../tree/m/index.js';
|
|
3
|
+
import { AccessedFunction, NotSubstitutedAccessedFunction } from '../AccessedFunction.js';
|
|
4
|
+
import { NodeOrDiagnosticLocation } from '../NodeOrDiagnosticLocation.js';
|
|
5
|
+
import { Analyzer } from './Analyzer.js';
|
|
6
|
+
import { ExpressionAnalysisOptions } from './ExpressionAnalysisOptions.js';
|
|
7
|
+
export declare class Resolver {
|
|
8
|
+
static resolveByCallExpression(analyzer: Analyzer, candidates: readonly NotSubstitutedAccessedFunction[], node: tree.CallExpression, analysisOptions: ExpressionAnalysisOptions, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined): ResolutionResult;
|
|
9
|
+
static resolveByCallExpressionParts(analyzer: Analyzer, candidates: readonly NotSubstitutedAccessedFunction[], argumentList: tree.ArgumentList | undefined, typeArgumentClause: tree.TypeArgumentClause | undefined, analysisOptions: ExpressionAnalysisOptions, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, diagnosticLocation: NodeOrDiagnosticLocation | undefined): ResolutionResult;
|
|
10
|
+
static resolveByTargetType(analyzer: Analyzer, candidates: readonly NotSubstitutedAccessedFunction[], typeArgumentClause: tree.TypeArgumentClause | undefined, analysisOptions: ExpressionAnalysisOptions, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, diagnosticLocation: NodeOrDiagnosticLocation | undefined): ResolutionResult;
|
|
11
|
+
private static convertProcessedSignature;
|
|
12
|
+
private static reportAmbiguousAccessDiagnostic;
|
|
13
|
+
}
|
|
14
|
+
export declare class ResolutionResult {
|
|
15
|
+
readonly suitableFunctions: readonly AccessedFunction[];
|
|
16
|
+
readonly singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined;
|
|
17
|
+
get suitableOrSingleFunction(): AccessedFunction | undefined;
|
|
18
|
+
constructor(suitableFunctions: readonly AccessedFunction[], singleNotSuitableSubstitutedCandidate: AccessedFunction | undefined);
|
|
19
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { Name } from '../../common/index.js';
|
|
2
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
3
|
+
import { NamedTypeEntity, PackageAliasEntity, ParameterEntity, VariableEntity } from '../../entities/index.js';
|
|
4
|
+
import * as tree from '../../tree/m/index.js';
|
|
5
|
+
import * as types from '../../types/index.js';
|
|
6
|
+
import { AccessedFunction, NotSubstitutedAccessedFunction } from '../AccessedFunction.js';
|
|
7
|
+
import { ComputedAccess } from '../ComputedAccess.js';
|
|
8
|
+
import { PackageNameTreeNode } from '../ImportedPackageNameTree.js';
|
|
9
|
+
import { Analyzer } from './Analyzer.js';
|
|
10
|
+
import * as callExpressionMeaning from './CallExpressionMeaning.js';
|
|
11
|
+
import { ExpressionAnalysisOptions } from './ExpressionAnalysisOptions.js';
|
|
12
|
+
import { NamedDeclaration } from './semantic-context/index.js';
|
|
13
|
+
export declare class FirstStageResolver {
|
|
14
|
+
private readonly semanticContext_;
|
|
15
|
+
private readonly analyzer;
|
|
16
|
+
private readonly node;
|
|
17
|
+
private readonly diagnostics;
|
|
18
|
+
private get semanticContext();
|
|
19
|
+
constructor(analyzer: Analyzer, node: tree.IdentifierExpression, diagnostics: DiagnosticAcceptor | undefined);
|
|
20
|
+
resolve(): MeaningStage1;
|
|
21
|
+
private resolveVariableAccess;
|
|
22
|
+
private resolveVariableEntityAccess;
|
|
23
|
+
private resolvePackageVariableAccess;
|
|
24
|
+
private getAccessiblePackageVariableGetter;
|
|
25
|
+
private getAccessiblePackageVariableSetter;
|
|
26
|
+
private resolveFieldAccess;
|
|
27
|
+
private getAccessibleFieldGetter;
|
|
28
|
+
private getAccessibleFieldSetter;
|
|
29
|
+
private resolveAccessOfVariableWithoutExplicitAccessors;
|
|
30
|
+
private checkExpressionDenotesType;
|
|
31
|
+
private resolveTypeAccess;
|
|
32
|
+
private tryResolveVariantValueAccess;
|
|
33
|
+
private createNotSubstitutedAccessedFunction;
|
|
34
|
+
private createComputedAccessForVariableWithoutExplicitAccessors;
|
|
35
|
+
}
|
|
36
|
+
export declare class SecondStageResolver {
|
|
37
|
+
private readonly analyzer;
|
|
38
|
+
private readonly node;
|
|
39
|
+
private readonly firstStageMeaning;
|
|
40
|
+
private readonly analysisOptions;
|
|
41
|
+
private readonly diagnostics;
|
|
42
|
+
constructor(analyzer: Analyzer, node: tree.IdentifierExpression, firstStageMeaning: MeaningStage1, analysisOptions: ExpressionAnalysisOptions | undefined, diagnostics: DiagnosticAcceptor | undefined);
|
|
43
|
+
resolve(): Meaning;
|
|
44
|
+
private resolveTypeAccessAtCalleePosition;
|
|
45
|
+
private resolveFunctionAccess;
|
|
46
|
+
private resolveNotCalledFunctionsAccess;
|
|
47
|
+
}
|
|
48
|
+
export type Meaning = Meaning_variableAccess | Meaning_functionAccess | Meaning_packageNameSegmentAccess | Meaning_packageAliasAccess | Meaning_typeAccess | Meaning_variantValueAccess | Meaning_typeAccessAtConstructorCall | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
|
49
|
+
declare class Meaning_variableAccess {
|
|
50
|
+
readonly variable: AccessedVariable;
|
|
51
|
+
readonly access: ComputedAccess;
|
|
52
|
+
readonly objectParameterContainingVariable: ParameterEntity | undefined;
|
|
53
|
+
readonly kind = "variable-access";
|
|
54
|
+
constructor(variable: AccessedVariable, access: ComputedAccess, objectParameterContainingVariable: ParameterEntity | undefined);
|
|
55
|
+
}
|
|
56
|
+
declare class Meaning_variantValueAccess {
|
|
57
|
+
readonly suitableTypes: readonly types.Type[];
|
|
58
|
+
readonly type: types.Type;
|
|
59
|
+
readonly field: types.Field;
|
|
60
|
+
readonly access: ComputedAccess;
|
|
61
|
+
readonly kind = "variant-value-access";
|
|
62
|
+
constructor(suitableTypes: readonly types.Type[], type: types.Type, field: types.Field, access: ComputedAccess);
|
|
63
|
+
}
|
|
64
|
+
declare class Meaning_functionAccess {
|
|
65
|
+
readonly candidates: readonly NotSubstitutedAccessedFunction[];
|
|
66
|
+
readonly suitableOrSingleFunction: AccessedFunction | undefined;
|
|
67
|
+
readonly objectParameterContainingFunctions: ParameterEntity | undefined;
|
|
68
|
+
readonly kind = "function-access";
|
|
69
|
+
constructor(candidates: readonly NotSubstitutedAccessedFunction[], suitableOrSingleFunction: AccessedFunction | undefined, objectParameterContainingFunctions: ParameterEntity | undefined);
|
|
70
|
+
}
|
|
71
|
+
declare class Meaning_packageAliasAccess {
|
|
72
|
+
readonly packageAlias: PackageAliasEntity;
|
|
73
|
+
readonly kind = "package-alias-access";
|
|
74
|
+
constructor(packageAlias: PackageAliasEntity);
|
|
75
|
+
}
|
|
76
|
+
declare class Meaning_packageNameSegmentAccess {
|
|
77
|
+
readonly packageTreeNode: PackageNameTreeNode;
|
|
78
|
+
readonly kind = "package-name-segment-access";
|
|
79
|
+
constructor(packageTreeNode: PackageNameTreeNode);
|
|
80
|
+
}
|
|
81
|
+
declare class Meaning_typeAccess {
|
|
82
|
+
readonly candidates: readonly NamedTypeEntity[];
|
|
83
|
+
readonly suitableTypes: readonly types.Type[];
|
|
84
|
+
readonly isUsedAsValue: boolean;
|
|
85
|
+
readonly kind = "type-access";
|
|
86
|
+
get singleSuitableType(): types.Type | undefined;
|
|
87
|
+
constructor(candidates: readonly NamedTypeEntity[], suitableTypes: readonly types.Type[], isUsedAsValue: boolean);
|
|
88
|
+
}
|
|
89
|
+
declare class Meaning_typeAccessAtConstructorCall {
|
|
90
|
+
readonly typeCandidates: readonly NamedTypeEntity[];
|
|
91
|
+
readonly callExpressionMeaning: callExpressionMeaning.Meaning_constructorCall;
|
|
92
|
+
readonly kind = "type-access-at-constructor-call";
|
|
93
|
+
constructor(typeCandidates: readonly NamedTypeEntity[], callExpressionMeaning: callExpressionMeaning.Meaning_constructorCall);
|
|
94
|
+
}
|
|
95
|
+
declare class Meaning_mixedAmbiguousAccess {
|
|
96
|
+
readonly declarations: readonly NamedDeclaration[];
|
|
97
|
+
readonly kind = "mixed-ambiguous-access";
|
|
98
|
+
constructor(declarations: readonly NamedDeclaration[]);
|
|
99
|
+
}
|
|
100
|
+
declare class Meaning_unresolved {
|
|
101
|
+
readonly kind = "unresolved";
|
|
102
|
+
}
|
|
103
|
+
export type MeaningStage1 = Meaning_variableAccess | MeaningStage1_functionAccess | Meaning_packageNameSegmentAccess | Meaning_packageAliasAccess | MeaningStage1_typeAccessAtCalleePosition | Meaning_typeAccess | Meaning_variantValueAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
|
104
|
+
declare class MeaningStage1_typeAccessAtCalleePosition {
|
|
105
|
+
readonly types: readonly NamedTypeEntity[];
|
|
106
|
+
readonly kind = "type-access-at-callee-position";
|
|
107
|
+
constructor(types: readonly NamedTypeEntity[]);
|
|
108
|
+
}
|
|
109
|
+
declare class MeaningStage1_functionAccess {
|
|
110
|
+
readonly functions: readonly NotSubstitutedAccessedFunction[];
|
|
111
|
+
readonly objectParameterContainingFunctions: ParameterEntity | undefined;
|
|
112
|
+
readonly kind = "function-access";
|
|
113
|
+
constructor(functions: readonly NotSubstitutedAccessedFunction[], objectParameterContainingFunctions: ParameterEntity | undefined);
|
|
114
|
+
}
|
|
115
|
+
export type AccessedVariable = AccessedVariable_entity | AccessedVariable_typeMember;
|
|
116
|
+
export declare class AccessedVariable_entity implements IAccessedVariable {
|
|
117
|
+
readonly value: VariableEntity;
|
|
118
|
+
readonly kind = "entity";
|
|
119
|
+
constructor(value: VariableEntity);
|
|
120
|
+
getEntity(): VariableEntity;
|
|
121
|
+
getName(): Name;
|
|
122
|
+
getType(): types.Type;
|
|
123
|
+
}
|
|
124
|
+
export declare class AccessedVariable_typeMember implements IAccessedVariable {
|
|
125
|
+
readonly value: types.Field;
|
|
126
|
+
readonly kind = "type-member";
|
|
127
|
+
constructor(value: types.Field);
|
|
128
|
+
getEntity(): VariableEntity;
|
|
129
|
+
getName(): Name;
|
|
130
|
+
getType(): types.Type;
|
|
131
|
+
}
|
|
132
|
+
interface IAccessedVariable {
|
|
133
|
+
getEntity(): VariableEntity;
|
|
134
|
+
getName(): Name;
|
|
135
|
+
getType(): types.Type;
|
|
136
|
+
}
|
|
137
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
2
|
+
import { IndexedAccessExpression } from '../../tree/m/index.js';
|
|
3
|
+
import * as types from '../../types/index.js';
|
|
4
|
+
import { ComputedAccess } from '../ComputedAccess.js';
|
|
5
|
+
import { Analyzer } from './Analyzer.js';
|
|
6
|
+
export declare class Resolver {
|
|
7
|
+
private readonly analyzer;
|
|
8
|
+
private readonly node;
|
|
9
|
+
private readonly diagnostics;
|
|
10
|
+
private readonly semanticContext_;
|
|
11
|
+
private get semanticContext();
|
|
12
|
+
constructor(analyzer: Analyzer, node: IndexedAccessExpression, diagnostics: DiagnosticAcceptor | undefined);
|
|
13
|
+
resolve(): Meaning;
|
|
14
|
+
private createComputedAccess;
|
|
15
|
+
private getAccessibleIndexerGetter;
|
|
16
|
+
private getAccessibleIndexerSetter;
|
|
17
|
+
private getDiagnosticLocation;
|
|
18
|
+
}
|
|
19
|
+
export type Meaning = Meaning_resolved | Meaning_unresolved;
|
|
20
|
+
declare class Meaning_resolved {
|
|
21
|
+
readonly candidates: readonly types.Indexer[];
|
|
22
|
+
readonly suitableIndexers: readonly types.Indexer[];
|
|
23
|
+
readonly access: ComputedAccess;
|
|
24
|
+
readonly kind = "resolved";
|
|
25
|
+
get singleSuitableIndexer(): types.Indexer | undefined;
|
|
26
|
+
get singleIndexer(): types.Indexer | undefined;
|
|
27
|
+
constructor(candidates: readonly types.Indexer[], suitableIndexers: readonly types.Indexer[], access: ComputedAccess);
|
|
28
|
+
}
|
|
29
|
+
declare class Meaning_unresolved {
|
|
30
|
+
readonly kind = "unresolved";
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
2
|
+
import * as tree from '../../tree/m/index.js';
|
|
3
|
+
import { DeclarationsUsageMap } from '../DeclarationsUsageMap.js';
|
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
|
5
|
+
export declare class InstanceFieldsInitializationValidator {
|
|
6
|
+
private readonly analyzer;
|
|
7
|
+
private readonly typeDeclaration;
|
|
8
|
+
private readonly declarationsUsageCountResult;
|
|
9
|
+
private readonly diagnostics;
|
|
10
|
+
private readonly semanticContext_;
|
|
11
|
+
private get semanticContext();
|
|
12
|
+
constructor(analyzer: Analyzer, typeDeclaration: tree.TypeWithMembersDeclaration, declarationsUsageCountResult: DeclarationsUsageMap, diagnostics: DiagnosticAcceptor);
|
|
13
|
+
validate(): void;
|
|
14
|
+
private getFieldsThatNeedToBeInitializedInConstructor;
|
|
15
|
+
private checkDefaultConstructorInitializesAllFields;
|
|
16
|
+
private checkConstructorInitializesAllFields;
|
|
17
|
+
private getFieldDiagnosticLocationWithFallback;
|
|
18
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
2
|
+
import { Entity, PackageTypeEntity, PackageVariableEntity } from '../../entities/index.js';
|
|
3
|
+
import * as tree from '../../tree/m/index.js';
|
|
4
|
+
import * as types from '../../types/index.js';
|
|
5
|
+
import { AccessedFunction, NotSubstitutedAccessedFunction } from '../AccessedFunction.js';
|
|
6
|
+
import { ComputedAccess } from '../ComputedAccess.js';
|
|
7
|
+
import { PackageNameTreeNode } from '../ImportedPackageNameTree.js';
|
|
8
|
+
import { Analyzer } from './Analyzer.js';
|
|
9
|
+
import * as callExpressionMeaning from './CallExpressionMeaning.js';
|
|
10
|
+
import { ExpressionAnalysisOptions } from './ExpressionAnalysisOptions.js';
|
|
11
|
+
export declare class FirstStageResolver {
|
|
12
|
+
private readonly semanticContext_;
|
|
13
|
+
private readonly analyzer;
|
|
14
|
+
private readonly node;
|
|
15
|
+
private readonly diagnostics;
|
|
16
|
+
private get memberName();
|
|
17
|
+
private get semanticContext();
|
|
18
|
+
private get receiver();
|
|
19
|
+
constructor(analyzer: Analyzer, node: tree.MemberAccessExpression, diagnostics: DiagnosticAcceptor | undefined);
|
|
20
|
+
resolve(): MeaningStage1;
|
|
21
|
+
private resolvePackageAliasMemberAccessMeaning;
|
|
22
|
+
private resolvePackageMemberAccessMeaning;
|
|
23
|
+
private resolvePackageTypeAccess;
|
|
24
|
+
private resolvePackageNameSegmentAccessMeaning;
|
|
25
|
+
private resolveStaticMemberOrVariantAccessMeaning;
|
|
26
|
+
private resolveInstanceMemberAccessMeaning;
|
|
27
|
+
private resolveFieldAccess;
|
|
28
|
+
private getAccessibleFieldGetter;
|
|
29
|
+
private getAccessibleFieldSetter;
|
|
30
|
+
private resolvePackageVariableAccess;
|
|
31
|
+
private getAccessiblePackageVariableGetter;
|
|
32
|
+
private getAccessiblePackageVariableSetter;
|
|
33
|
+
private createComputedAccessForVariableWithoutExplicitAccessors;
|
|
34
|
+
}
|
|
35
|
+
export declare class SecondStageResolver {
|
|
36
|
+
private readonly analyzer;
|
|
37
|
+
private readonly node;
|
|
38
|
+
private readonly firstStageMeaning;
|
|
39
|
+
private readonly analysisOptions;
|
|
40
|
+
private readonly diagnostics;
|
|
41
|
+
constructor(analyzer: Analyzer, node: tree.MemberAccessExpression, firstStageMeaning: MeaningStage1, analysisOptions: ExpressionAnalysisOptions | undefined, diagnostics: DiagnosticAcceptor | undefined);
|
|
42
|
+
resolve(): Meaning;
|
|
43
|
+
private resolveTypeAccessAtCalleePosition;
|
|
44
|
+
private resolvePackageFunctionAccess;
|
|
45
|
+
private resolveStaticMethodAccess;
|
|
46
|
+
private resolveInstanceMethodAccess;
|
|
47
|
+
private resolveNotCalledFunctionsAccess;
|
|
48
|
+
}
|
|
49
|
+
export type Meaning = Meaning_packageVariableAccess | Meaning_packageFunctionAccess | Meaning_packageTypeAccess | Meaning_typeAccessAtConstructorCall | Meaning_packageNameSegmentAccess | Meaning_staticFieldAccess | Meaning_staticMethodAccess | Meaning_instanceFieldAccess | Meaning_instanceMethodAccess | Meaning_mixedAmbiguousAccess | Meaning_unresolved;
|
|
50
|
+
declare class Meaning_packageVariableAccess {
|
|
51
|
+
readonly variable: PackageVariableEntity;
|
|
52
|
+
readonly access: ComputedAccess;
|
|
53
|
+
readonly kind = "package-variable-access";
|
|
54
|
+
constructor(variable: PackageVariableEntity, access: ComputedAccess);
|
|
55
|
+
}
|
|
56
|
+
declare class Meaning_packageFunctionAccess {
|
|
57
|
+
readonly candidates: readonly NotSubstitutedAccessedFunction[];
|
|
58
|
+
readonly suitableOrSingleFunction: AccessedFunction | undefined;
|
|
59
|
+
readonly kind = "package-function-access";
|
|
60
|
+
constructor(candidates: readonly NotSubstitutedAccessedFunction[], suitableOrSingleFunction: AccessedFunction | undefined);
|
|
61
|
+
}
|
|
62
|
+
declare class Meaning_packageTypeAccess {
|
|
63
|
+
readonly candidates: readonly PackageTypeEntity[];
|
|
64
|
+
readonly suitableTypes: readonly types.Type[];
|
|
65
|
+
readonly isUsedAsValue: boolean;
|
|
66
|
+
readonly kind = "package-type-access";
|
|
67
|
+
get singleSuitableType(): types.Type | undefined;
|
|
68
|
+
constructor(candidates: readonly PackageTypeEntity[], suitableTypes: readonly types.Type[], isUsedAsValue: boolean);
|
|
69
|
+
}
|
|
70
|
+
declare class Meaning_typeAccessAtConstructorCall {
|
|
71
|
+
readonly typeCandidates: readonly PackageTypeEntity[];
|
|
72
|
+
readonly callExpressionMeaning: callExpressionMeaning.Meaning_constructorCall;
|
|
73
|
+
readonly kind = "type-access-at-constructor-call";
|
|
74
|
+
constructor(typeCandidates: readonly PackageTypeEntity[], callExpressionMeaning: callExpressionMeaning.Meaning_constructorCall);
|
|
75
|
+
}
|
|
76
|
+
declare class Meaning_packageNameSegmentAccess {
|
|
77
|
+
readonly packageTreeNode: PackageNameTreeNode;
|
|
78
|
+
readonly kind = "package-name-segment-access";
|
|
79
|
+
constructor(packageTreeNode: PackageNameTreeNode);
|
|
80
|
+
}
|
|
81
|
+
declare class Meaning_staticFieldAccess {
|
|
82
|
+
readonly type: types.Type;
|
|
83
|
+
readonly field: types.Field;
|
|
84
|
+
readonly access: ComputedAccess;
|
|
85
|
+
readonly kind = "static-field-access";
|
|
86
|
+
constructor(type: types.Type, field: types.Field, access: ComputedAccess);
|
|
87
|
+
}
|
|
88
|
+
declare class Meaning_staticMethodAccess {
|
|
89
|
+
readonly type: types.Type;
|
|
90
|
+
readonly candidates: readonly NotSubstitutedAccessedFunction[];
|
|
91
|
+
readonly suitableOrSingleFunction: AccessedFunction | undefined;
|
|
92
|
+
readonly kind = "static-method-access";
|
|
93
|
+
constructor(type: types.Type, candidates: readonly NotSubstitutedAccessedFunction[], suitableOrSingleFunction: AccessedFunction | undefined);
|
|
94
|
+
}
|
|
95
|
+
declare class Meaning_instanceFieldAccess {
|
|
96
|
+
readonly field: types.Field;
|
|
97
|
+
readonly access: ComputedAccess;
|
|
98
|
+
readonly kind = "instance-field-access";
|
|
99
|
+
constructor(field: types.Field, access: ComputedAccess);
|
|
100
|
+
}
|
|
101
|
+
declare class Meaning_instanceMethodAccess {
|
|
102
|
+
readonly candidates: readonly NotSubstitutedAccessedFunction[];
|
|
103
|
+
readonly suitableOrSingleFunction: AccessedFunction | undefined;
|
|
104
|
+
readonly kind = "instance-method-access";
|
|
105
|
+
constructor(candidates: readonly NotSubstitutedAccessedFunction[], suitableOrSingleFunction: AccessedFunction | undefined);
|
|
106
|
+
}
|
|
107
|
+
declare class Meaning_mixedAmbiguousAccess {
|
|
108
|
+
readonly entities: readonly Entity[];
|
|
109
|
+
readonly kind = "mixed-ambiguous-access";
|
|
110
|
+
constructor(entities: readonly Entity[]);
|
|
111
|
+
}
|
|
112
|
+
declare class Meaning_unresolved {
|
|
113
|
+
readonly kind = "unresolved";
|
|
114
|
+
}
|
|
115
|
+
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;
|
|
116
|
+
declare class MeaningStage1_typeAccessAtCalleePosition {
|
|
117
|
+
readonly types: readonly PackageTypeEntity[];
|
|
118
|
+
readonly kind = "type-access-at-callee-position";
|
|
119
|
+
constructor(types: readonly PackageTypeEntity[]);
|
|
120
|
+
}
|
|
121
|
+
declare class MeaningStage1_packageFunctionAccess {
|
|
122
|
+
readonly functions: readonly NotSubstitutedAccessedFunction[];
|
|
123
|
+
readonly kind = "package-function-access";
|
|
124
|
+
constructor(functions: readonly NotSubstitutedAccessedFunction[]);
|
|
125
|
+
}
|
|
126
|
+
declare class MeaningStage1_staticMethodAccess {
|
|
127
|
+
readonly type: types.Type;
|
|
128
|
+
readonly functions: readonly NotSubstitutedAccessedFunction[];
|
|
129
|
+
readonly kind = "static-method-access";
|
|
130
|
+
constructor(type: types.Type, functions: readonly NotSubstitutedAccessedFunction[]);
|
|
131
|
+
}
|
|
132
|
+
declare class MeaningStage1_instanceMethodAccess {
|
|
133
|
+
readonly functions: readonly NotSubstitutedAccessedFunction[];
|
|
134
|
+
readonly kind = "instance-method-access";
|
|
135
|
+
constructor(functions: readonly NotSubstitutedAccessedFunction[]);
|
|
136
|
+
}
|
|
137
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare enum ModifierFlags {
|
|
2
|
+
None = 0,
|
|
3
|
+
HiddenWithoutLevel = 1,
|
|
4
|
+
HiddenInType = 2,
|
|
5
|
+
HiddenInHierarchy = 4,
|
|
6
|
+
HiddenInFile = 8,
|
|
7
|
+
HiddenInPackage = 16,
|
|
8
|
+
Static = 32,
|
|
9
|
+
Abstract = 64,
|
|
10
|
+
Basic = 128,
|
|
11
|
+
Override = 256,
|
|
12
|
+
Async = 512,
|
|
13
|
+
Const = 1024,
|
|
14
|
+
First = 1,
|
|
15
|
+
Last = 1024,
|
|
16
|
+
NotComputed = 2048,
|
|
17
|
+
AnyHiddenModifier = 31,
|
|
18
|
+
HiddenInPackageOrWithoutLevel = 17,
|
|
19
|
+
HiddenInTypeOrWithoutLevel = 3
|
|
20
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
2
|
+
import { NamedTypeEntity, PackageAliasEntity } from '../../entities/index.js';
|
|
3
|
+
import { QualifiedName } from '../../tree/m/index.js';
|
|
4
|
+
import { EntityOrPackageNameTreeNode } from '../EntityOrPackageNameTreeNode.js';
|
|
5
|
+
import { PackageNameTreeNode } from '../ImportedPackageNameTree.js';
|
|
6
|
+
import { Analyzer } from './Analyzer.js';
|
|
7
|
+
export declare class NamedTypeResolver {
|
|
8
|
+
private readonly analyzer;
|
|
9
|
+
private readonly node;
|
|
10
|
+
private readonly diagnostics;
|
|
11
|
+
private readonly semanticContext_;
|
|
12
|
+
private get semanticContext();
|
|
13
|
+
constructor(analyzer: Analyzer, node: QualifiedName, diagnostics: DiagnosticAcceptor | undefined);
|
|
14
|
+
resolve(): NamedTypeResolutionResult;
|
|
15
|
+
private lookupTypeOrContainerWithTypes;
|
|
16
|
+
private findTypesOrContainersWithTypesInResolvedQualifier;
|
|
17
|
+
private findTypesOrContainersWithTypesInPackageAccessedViaAlias;
|
|
18
|
+
private findTypesOrContainersWithTypesInPackageNameSegment;
|
|
19
|
+
private convertPackageMember;
|
|
20
|
+
private createAmbiguousAccessDiagnostic;
|
|
21
|
+
}
|
|
22
|
+
export declare class NamedTypeResolutionResult {
|
|
23
|
+
readonly types: readonly NamedTypeEntity[];
|
|
24
|
+
readonly resolvedQualifiers: readonly ResolvedQualifier[];
|
|
25
|
+
readonly ambiguousDeclarations: readonly EntityOrPackageNameTreeNode[] | undefined;
|
|
26
|
+
constructor(types: readonly NamedTypeEntity[], resolvedQualifiers: readonly ResolvedQualifier[], ambiguousDeclarations: readonly EntityOrPackageNameTreeNode[] | undefined);
|
|
27
|
+
}
|
|
28
|
+
export type ResolvedQualifier = ResolvedQualifier_packageNameSegment | ResolvedQualifier_packageAlias | ResolvedQualifier_type;
|
|
29
|
+
export declare class ResolvedQualifier_packageNameSegment {
|
|
30
|
+
readonly packageTreeNode: PackageNameTreeNode;
|
|
31
|
+
readonly kind = "package-name-segment";
|
|
32
|
+
constructor(packageTreeNode: PackageNameTreeNode);
|
|
33
|
+
}
|
|
34
|
+
export declare class ResolvedQualifier_packageAlias {
|
|
35
|
+
readonly packageAlias: PackageAliasEntity;
|
|
36
|
+
readonly kind = "package-alias";
|
|
37
|
+
constructor(packageAlias: PackageAliasEntity);
|
|
38
|
+
}
|
|
39
|
+
export declare class ResolvedQualifier_type {
|
|
40
|
+
readonly candidates: readonly NamedTypeEntity[];
|
|
41
|
+
readonly suitableTypes: readonly NamedTypeEntity[];
|
|
42
|
+
readonly kind = "type";
|
|
43
|
+
constructor(candidates: readonly NamedTypeEntity[], suitableTypes: readonly NamedTypeEntity[]);
|
|
44
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
2
|
+
import { NamedTypeSpecifier } from '../../tree/m/index.js';
|
|
3
|
+
import * as types from '../../types/index.js';
|
|
4
|
+
import { EntityOrPackageNameTreeNode } from '../EntityOrPackageNameTreeNode.js';
|
|
5
|
+
import { Analyzer } from './Analyzer.js';
|
|
6
|
+
import { ResolvedQualifier } from './NamedTypeResolver.js';
|
|
7
|
+
export declare class NamedTypeSpecifierResolver {
|
|
8
|
+
private readonly analyzer;
|
|
9
|
+
private readonly node;
|
|
10
|
+
private readonly diagnostics;
|
|
11
|
+
constructor(analyzer: Analyzer, node: NamedTypeSpecifier, diagnostics: DiagnosticAcceptor | undefined);
|
|
12
|
+
resolve(): NamedTypeSpecifierResolutionResult;
|
|
13
|
+
}
|
|
14
|
+
export declare class NamedTypeSpecifierResolutionResult {
|
|
15
|
+
readonly type: types.Type | undefined;
|
|
16
|
+
readonly resolvedQualifiers: readonly ResolvedQualifier[];
|
|
17
|
+
readonly ambiguousDeclarations: readonly EntityOrPackageNameTreeNode[] | undefined;
|
|
18
|
+
constructor(type: types.Type | undefined, resolvedQualifiers: readonly ResolvedQualifier[], ambiguousDeclarations: readonly EntityOrPackageNameTreeNode[] | undefined);
|
|
19
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
2
|
+
import { ParameterEntity } from '../../entities/index.js';
|
|
3
|
+
import * as tree from '../../tree/m/index.js';
|
|
4
|
+
import * as types from '../../types/index.js';
|
|
5
|
+
import { Analyzer } from './Analyzer.js';
|
|
6
|
+
export declare class Resolver {
|
|
7
|
+
private readonly analyzer;
|
|
8
|
+
private readonly node;
|
|
9
|
+
private readonly diagnostics;
|
|
10
|
+
constructor(analyzer: Analyzer, node: tree.ObjectExpression, diagnostics: DiagnosticAcceptor | undefined);
|
|
11
|
+
resolve(): Meaning;
|
|
12
|
+
private invalidContextDiagnostic;
|
|
13
|
+
private staticContextDiagnostic;
|
|
14
|
+
}
|
|
15
|
+
export type Meaning = Meaning_objectAccess | Meaning_objectParameterAccess | Meaning_unresolved;
|
|
16
|
+
declare class Meaning_objectAccess {
|
|
17
|
+
readonly type: types.Type;
|
|
18
|
+
readonly kind = "object-access";
|
|
19
|
+
constructor(type: types.Type);
|
|
20
|
+
}
|
|
21
|
+
declare class Meaning_objectParameterAccess {
|
|
22
|
+
readonly parameter: ParameterEntity;
|
|
23
|
+
readonly kind = "object-parameter-access";
|
|
24
|
+
constructor(parameter: ParameterEntity);
|
|
25
|
+
}
|
|
26
|
+
declare class Meaning_unresolved {
|
|
27
|
+
readonly kind = "unresolved";
|
|
28
|
+
}
|
|
29
|
+
export {};
|