@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,104 @@
|
|
|
1
|
+
import { Displayable, Name } from '../../common/index.js';
|
|
2
|
+
import { DiagnosticAcceptorWithArgumentFactory } from '../../diagnostic/Diagnostic.js';
|
|
3
|
+
import { TypeParameterEntity } from '../../entities/index.js';
|
|
4
|
+
import * as tree from '../../tree/m/index.js';
|
|
5
|
+
import * as types from '../../types/index.js';
|
|
6
|
+
import { DiagnosticArgumentFactory } from '../DiagnosticArgumentFactory.js';
|
|
7
|
+
import { NodeOrDiagnosticLocation } from '../NodeOrDiagnosticLocation.js';
|
|
8
|
+
import { Analyzer } from './Analyzer.js';
|
|
9
|
+
import * as matcher from './ArgumentsToParametersMatcher.js';
|
|
10
|
+
import { ExpressionAnalysisOptions } from './ExpressionAnalysisOptions.js';
|
|
11
|
+
import * as inferrer from './TypeArgumentInferrer.js';
|
|
12
|
+
export declare class OverloadResolver<TSignature extends ISignature<TParameter>, TParameter extends ISignatureParameter, TArgument extends Argument> {
|
|
13
|
+
private readonly analyzer;
|
|
14
|
+
private readonly mode;
|
|
15
|
+
private readonly signatures;
|
|
16
|
+
private readonly arguments_;
|
|
17
|
+
private readonly analysisOptions;
|
|
18
|
+
private readonly dataForTypeArgumentInference;
|
|
19
|
+
private readonly diagnostics;
|
|
20
|
+
private readonly nodesForDiagnostic;
|
|
21
|
+
constructor(analyzer: Analyzer, mode: ResolutionMode, signatures: readonly TSignature[], arguments_: readonly TArgument[], analysisOptions: ExpressionAnalysisOptions, dataForTypeArgumentInference: DataForTypeArgumentInference | undefined, diagnostics: DiagnosticAcceptorWithArgumentFactory | undefined, nodesForDiagnostic: DiagnosticLocations | undefined);
|
|
22
|
+
resolveOverload(): ProcessedSignature<TSignature, TParameter, TArgument>[];
|
|
23
|
+
private areArgumentTypesAssignableToParameterTypes;
|
|
24
|
+
private tryChooseBestSignature;
|
|
25
|
+
private tryChooseBetterSignatureBasedOnParameterTypes;
|
|
26
|
+
private chooseBetterTargetType;
|
|
27
|
+
private tryChooseBetterSignatureBasedOnVariadicParameters;
|
|
28
|
+
private tryChooseBetterSignatureBasedOnPresenceOfTypeParameters;
|
|
29
|
+
private tryChooseBetterSignatureBasedOnParameterCount;
|
|
30
|
+
private functionLiteralCouldBeAssignableToType;
|
|
31
|
+
private reportAmbiguousAccessDiagnostic;
|
|
32
|
+
}
|
|
33
|
+
export interface ISignature<TParameter extends ISignatureParameter> extends matcher.ISignature<TParameter> {
|
|
34
|
+
getTypeParameters(): readonly TypeParameterEntity[];
|
|
35
|
+
getParameters(): readonly TParameter[];
|
|
36
|
+
getReturnType(): types.Type | undefined;
|
|
37
|
+
getOuterSubstitutions(): types.Substitutions | undefined;
|
|
38
|
+
toDisplayable(factory: DiagnosticArgumentFactory): Displayable;
|
|
39
|
+
}
|
|
40
|
+
export interface ISignatureParameter extends matcher.ISignatureParameter {
|
|
41
|
+
getType(): types.Type;
|
|
42
|
+
getIndex(): number;
|
|
43
|
+
}
|
|
44
|
+
export type ResolutionMode = ResolutionByExplicitArguments | ResolutionByTargetType;
|
|
45
|
+
export declare class ResolutionByExplicitArguments {
|
|
46
|
+
readonly kind = "by-explicit-arguments";
|
|
47
|
+
}
|
|
48
|
+
export declare class ResolutionByTargetType {
|
|
49
|
+
readonly targetType: types.FunctionType;
|
|
50
|
+
readonly kind = "by-target-type";
|
|
51
|
+
constructor(targetType: types.FunctionType);
|
|
52
|
+
}
|
|
53
|
+
export type Argument = SourceArgument | IntrinsicArgument;
|
|
54
|
+
export interface SourceArgument extends matcher.IArgument, inferrer.SourceArgument, IArgument {
|
|
55
|
+
readonly kind: 'source';
|
|
56
|
+
readonly expression: tree.Expression;
|
|
57
|
+
}
|
|
58
|
+
export declare class IntrinsicArgument implements matcher.IArgument, inferrer.IntrinsicArgument, IArgument {
|
|
59
|
+
readonly kind = "intrinsic";
|
|
60
|
+
readonly type: types.Type;
|
|
61
|
+
get name(): Name | undefined;
|
|
62
|
+
constructor(type: types.Type);
|
|
63
|
+
getDiagnosticLocation(): NodeOrDiagnosticLocation | undefined;
|
|
64
|
+
getType(analysisOptions_: ExpressionAnalysisOptions | undefined): types.Type;
|
|
65
|
+
}
|
|
66
|
+
interface IArgument {
|
|
67
|
+
getType(analysisOptions: ExpressionAnalysisOptions | undefined): types.Type;
|
|
68
|
+
}
|
|
69
|
+
export declare class SourceNodeArgument implements SourceArgument {
|
|
70
|
+
readonly kind = "source";
|
|
71
|
+
readonly node: tree.Argument;
|
|
72
|
+
readonly name: Name | undefined;
|
|
73
|
+
private readonly analyzer;
|
|
74
|
+
get expression(): tree.Expression;
|
|
75
|
+
constructor(analyzer: Analyzer, node: tree.Argument);
|
|
76
|
+
getDiagnosticLocation(): NodeOrDiagnosticLocation;
|
|
77
|
+
getType(analysisOptions: ExpressionAnalysisOptions | undefined): types.Type;
|
|
78
|
+
}
|
|
79
|
+
export declare class SourceExpressionArgument implements SourceArgument {
|
|
80
|
+
private readonly analyzer;
|
|
81
|
+
readonly expression: tree.Expression;
|
|
82
|
+
readonly kind = "source";
|
|
83
|
+
get name(): Name | undefined;
|
|
84
|
+
constructor(analyzer: Analyzer, expression: tree.Expression);
|
|
85
|
+
getDiagnosticLocation(): NodeOrDiagnosticLocation;
|
|
86
|
+
getType(analysisOptions: ExpressionAnalysisOptions | undefined): types.Type;
|
|
87
|
+
}
|
|
88
|
+
export declare class DataForTypeArgumentInference {
|
|
89
|
+
readonly specifiedTypeArguments: readonly types.Type[];
|
|
90
|
+
readonly targetType: types.Type | undefined;
|
|
91
|
+
constructor(specifiedTypeArguments: readonly types.Type[], targetType: types.Type | undefined);
|
|
92
|
+
}
|
|
93
|
+
export interface DiagnosticLocations {
|
|
94
|
+
readonly access: NodeOrDiagnosticLocation | undefined;
|
|
95
|
+
readonly typeArgumentClause: NodeOrDiagnosticLocation | undefined;
|
|
96
|
+
readonly argumentList: NodeOrDiagnosticLocation | undefined;
|
|
97
|
+
}
|
|
98
|
+
export interface ProcessedSignature<TSignature extends ISignature<TParameter>, TParameter extends ISignatureParameter, TArgument extends matcher.IArgument> {
|
|
99
|
+
readonly value: TSignature;
|
|
100
|
+
readonly matchResult: matcher.MatchResult<TParameter, TArgument>;
|
|
101
|
+
readonly typeArguments: readonly types.Type[] | undefined;
|
|
102
|
+
readonly isMatching: boolean;
|
|
103
|
+
}
|
|
104
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Diagnostic } from '../../diagnostic/Diagnostic.js';
|
|
2
|
+
import { MethodEntity, TypeWithMembersOrExtensionEntity } 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
|
+
import { SemanticContext } from './semantic-context/SemanticContext.js';
|
|
7
|
+
export declare class OwnAndBaseConstructorCallsChecker {
|
|
8
|
+
private readonly analyzer;
|
|
9
|
+
private readonly constructorDeclarations;
|
|
10
|
+
private readonly typeEntity;
|
|
11
|
+
private readonly semanticContext;
|
|
12
|
+
constructor(analyzer: Analyzer, constructorDeclarations: readonly tree.MethodDeclaration[], typeEntity: TypeWithMembersOrExtensionEntity, semanticContext: SemanticContext);
|
|
13
|
+
check(): OwnAndBaseConstructorCallsCheckResult;
|
|
14
|
+
private addOwnConstructorCallOrReportCycleDiagnostic;
|
|
15
|
+
private getUnaliasedBaseObjectType;
|
|
16
|
+
private findAccessibleConstructorWithoutParameters;
|
|
17
|
+
}
|
|
18
|
+
export declare class OwnAndBaseConstructorCallsCheckResult {
|
|
19
|
+
readonly typeRequiresExplicitOwnOrBaseConstructorCalls: boolean;
|
|
20
|
+
readonly ownOrBaseConstructorCallInfos: ReadonlyMap<MethodEntity, OwnOrBaseConstructorCallInfo>;
|
|
21
|
+
readonly diagnostics: readonly Diagnostic[];
|
|
22
|
+
constructor(typeRequiresExplicitOwnOrBaseConstructorCalls: boolean, ownOrBaseConstructorCallInfos: ReadonlyMap<MethodEntity, OwnOrBaseConstructorCallInfo>, diagnostics: readonly Diagnostic[]);
|
|
23
|
+
}
|
|
24
|
+
export declare class OwnOrBaseConstructorCallInfo {
|
|
25
|
+
readonly isOwnConstructorCall: boolean;
|
|
26
|
+
readonly constructor_: types.Method;
|
|
27
|
+
/**
|
|
28
|
+
* Отсутствие узла означает, что базовый конструктор без параметров не был вызван явно.
|
|
29
|
+
*/
|
|
30
|
+
readonly node: tree.CallExpression | undefined;
|
|
31
|
+
constructor(isOwnConstructorCall: boolean, constructor_: types.Method,
|
|
32
|
+
/**
|
|
33
|
+
* Отсутствие узла означает, что базовый конструктор без параметров не был вызван явно.
|
|
34
|
+
*/
|
|
35
|
+
node: tree.CallExpression | undefined);
|
|
36
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
2
|
+
import { SourcePackageM } from '../../project/SourcePackage.js';
|
|
3
|
+
import { DeclarationsUsageMap } from '../DeclarationsUsageMap.js';
|
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
|
5
|
+
export declare class PackageAndStaticVariablesInitializationValidator {
|
|
6
|
+
private readonly analyzer;
|
|
7
|
+
private readonly package_;
|
|
8
|
+
private readonly declarationsUsageMapList;
|
|
9
|
+
private readonly diagnostics;
|
|
10
|
+
constructor(analyzer: Analyzer, package_: SourcePackageM, declarationsUsageMapList: readonly DeclarationsUsageMap[], diagnostics: DiagnosticAcceptor);
|
|
11
|
+
validate(): void;
|
|
12
|
+
private getVariablesThatNeedToBeInitializedInSourceFile;
|
|
13
|
+
private collectStaticFieldsThatNeedToBeInitializedInConstructor;
|
|
14
|
+
private excludeVariablesInitializedInSourceFile;
|
|
15
|
+
private reportNotInitialedVariableDiagnostic;
|
|
16
|
+
private getVariableDiagnosticLocationWithFallback;
|
|
17
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Analyzer } from './Analyzer.js';
|
|
2
|
+
import * as controlFlow from './control-flow/index.js';
|
|
3
|
+
export declare class ReachabilityChecker {
|
|
4
|
+
private readonly analyzer;
|
|
5
|
+
private readonly checkResults;
|
|
6
|
+
constructor(analyzer: Analyzer);
|
|
7
|
+
/**
|
|
8
|
+
* Проверяет, достижим ли узел графа потока управления с учётом семантики.
|
|
9
|
+
*
|
|
10
|
+
* Дополнительные проверки необходимы по причине того, что граф потока управления строится на основе синтаксического
|
|
11
|
+
* дерева и не учитывает семантику.
|
|
12
|
+
*
|
|
13
|
+
* Например, следующий код
|
|
14
|
+
* ```artel
|
|
15
|
+
* пусть а = Объект()
|
|
16
|
+
* если не(а это Объект)
|
|
17
|
+
* {
|
|
18
|
+
* // ...
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* достижим с точки зрения синтаксиса, но недостижим с точки зрения семантики, поскольку типом переменной `а`
|
|
23
|
+
* всегда является `Объект`.
|
|
24
|
+
*/
|
|
25
|
+
isControlFlowNodeReachable(node: controlFlow.Node): boolean;
|
|
26
|
+
private isConditionReachable;
|
|
27
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
2
|
+
import * as types from '../../types/index.js';
|
|
3
|
+
import { NodeOrDiagnosticLocation } from '../NodeOrDiagnosticLocation.js';
|
|
4
|
+
import { TypeMemberLookupContext } from '../TypeMemberLookup.js';
|
|
5
|
+
import { Analyzer } from './Analyzer.js';
|
|
6
|
+
export declare class ReductionSourceMemberFinder {
|
|
7
|
+
private static readonly signatureComparisonOptions;
|
|
8
|
+
private readonly analyzer;
|
|
9
|
+
constructor(analyzer: Analyzer);
|
|
10
|
+
findField(member: types.Field, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, diagnosticLocation: NodeOrDiagnosticLocation): types.Field | undefined;
|
|
11
|
+
findMethod(member: types.Method, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, diagnosticLocation: NodeOrDiagnosticLocation): types.Method | undefined;
|
|
12
|
+
findIndexer(member: types.Indexer, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, diagnosticLocation: NodeOrDiagnosticLocation): types.Indexer | undefined;
|
|
13
|
+
findDereferenceOperator(member: types.DereferenceOperator, reductionSource: types.Type, lookupContext: TypeMemberLookupContext, diagnostics: DiagnosticAcceptor, diagnosticLocation: NodeOrDiagnosticLocation): types.DereferenceOperator | undefined;
|
|
14
|
+
private getTypeMemberLookupOptions;
|
|
15
|
+
private checkMembersHaveSameHiding;
|
|
16
|
+
private checkMembersHaveSameTypes;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Name } from '../../common/Name.js';
|
|
2
|
+
import { PackageLocale } from '../../common/PackageLocale.js';
|
|
3
|
+
export declare const enum ReservedNameKind {
|
|
4
|
+
Result = 0,
|
|
5
|
+
Value = 1,
|
|
6
|
+
Creation = 2,
|
|
7
|
+
Destruction = 3,
|
|
8
|
+
Stored = 4
|
|
9
|
+
}
|
|
10
|
+
export declare const reservedNamesByLocale: {
|
|
11
|
+
readonly [T in PackageLocale]: {
|
|
12
|
+
readonly [T in ReservedNameKind]: Name;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const reservedNameKindByNameKey: { readonly [T in PackageLocale]: ReadonlyMap<string, ReservedNameKind>; };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { PackageLocale } from '../../common/index.js';
|
|
2
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
3
|
+
import { EntityLocalizationContext, LocalizablePackageMemberEntity } from '../../entities/EntityLocalizationContext.js';
|
|
4
|
+
import { AnonymousTypeEntity, Entity, EntityContainingParameter, EntityContainingTypeParameter, PackageEntity, PackageEntityMembers, PackageMemberEntity, ParameterEntity, TypeEntityMembers, TypeMemberEntity, TypeParameterEntity, TypeWithMembersOrExtensionEntity, LocalTypeEntity } from '../../entities/index.js';
|
|
5
|
+
import { PackageName, SourceFile, TranslationPackageM } from '../../project/index.js';
|
|
6
|
+
import * as tree from '../../tree/m/index.js';
|
|
7
|
+
import { Analyzer } from './Analyzer.js';
|
|
8
|
+
export declare class ResolvedTranslationPackage {
|
|
9
|
+
private static readonly maxDisplayedNotTranslatedEntitiesCount;
|
|
10
|
+
readonly localizationContext: EntityLocalizationContext;
|
|
11
|
+
readonly translatedTargetPackage: PackageEntity;
|
|
12
|
+
private readonly analyzer;
|
|
13
|
+
private readonly package_;
|
|
14
|
+
private readonly packageEntity;
|
|
15
|
+
private readonly targetPackage;
|
|
16
|
+
private readonly entityNameConflictsValidator;
|
|
17
|
+
private readonly translatedEntityByOriginal;
|
|
18
|
+
private readonly packageMemberTranslationTargetsByNode;
|
|
19
|
+
private readonly typeMemberTranslationTargetsByNode;
|
|
20
|
+
private readonly translatedPackageMembers;
|
|
21
|
+
private readonly translatedTypeMembersByTypeOrExtensionEntity;
|
|
22
|
+
constructor(analyzer: Analyzer, package_: TranslationPackageM, targetPackage: PackageEntity);
|
|
23
|
+
getTargetPackage(): PackageEntity;
|
|
24
|
+
getDefinition(): TranslationPackageM;
|
|
25
|
+
getTranslatedName(): PackageName;
|
|
26
|
+
getTranslationLocale(): PackageLocale;
|
|
27
|
+
getTranslatedPackageMembers(): PackageEntityMembers;
|
|
28
|
+
ensureAllLazyDiagnosticsReportedForSourceFile(sourceFile: SourceFile): void;
|
|
29
|
+
accumulateDiagnosticForSourceFile(sourceFile: SourceFile, diagnostics: DiagnosticAcceptor): void;
|
|
30
|
+
getPackageMemberTranslationTargets(node: tree.TranslationDeclaration): TranslationTargets<LocalizablePackageMemberEntity> | undefined;
|
|
31
|
+
getTypeMemberTranslationTargets(node: tree.TypeMemberTranslation): TranslationTargets<TypeMemberEntity> | undefined;
|
|
32
|
+
getTranslatedPackageMember(entity: LocalizablePackageMemberEntity): LocalizablePackageMemberEntity;
|
|
33
|
+
getTranslatedTypeMember(entity: TypeMemberEntity): TypeMemberEntity;
|
|
34
|
+
getTranslatedAnonymousTypeEntity(entity: AnonymousTypeEntity): AnonymousTypeEntity;
|
|
35
|
+
getTranslatedLocalTypeEntity(entity: LocalTypeEntity): LocalTypeEntity;
|
|
36
|
+
getTranslatedTypeOrExtensionMembers(translatedTypeEntity: TypeWithMembersOrExtensionEntity): TypeEntityMembers;
|
|
37
|
+
createTranslatedTypeParameters(original: readonly TypeParameterEntity[], node: tree.TranslationTypeParameterList | undefined, containingEntity: EntityContainingTypeParameter): readonly TypeParameterEntity[];
|
|
38
|
+
createTranslatedParameters(original: readonly ParameterEntity[], node: tree.TranslationParameterList | undefined, containingEntity: EntityContainingParameter): readonly ParameterEntity[];
|
|
39
|
+
static isPackageMemberEntityThatShouldBeTranslatedByUser(entity: PackageMemberEntity): boolean;
|
|
40
|
+
static isTypeMemberEntityThatShouldBeTranslatedByUser(entity: TypeMemberEntity): boolean;
|
|
41
|
+
private createTranslatedPackageMembers;
|
|
42
|
+
private createTranslatedTypeOrExtensionMembers;
|
|
43
|
+
private ensureTypeMembersHaveBeenCreated;
|
|
44
|
+
private reportPackageMemberHasAlreadyBeenTranslatedDiagnostic;
|
|
45
|
+
private reportTypeMemberHasAlreadyBeenTranslatedDiagnostic;
|
|
46
|
+
private createTranslatedNamedPackageMemberEntityWithMissingTranslation;
|
|
47
|
+
private createTranslatedTypeMemberEntityWithMissingTranslation;
|
|
48
|
+
private getPackageVariableTranslationTargets;
|
|
49
|
+
private getPackageFunctionTranslationTargets;
|
|
50
|
+
private getFunctionTypeTranslationTargets;
|
|
51
|
+
private createAndCacheTranslatedAnonymousFunctionType;
|
|
52
|
+
private getTypeTranslationTargets;
|
|
53
|
+
private getFieldOrVariantTranslationTargets;
|
|
54
|
+
private getMethodTranslationTargets;
|
|
55
|
+
private getIndexerTranslationTargets;
|
|
56
|
+
private checkTranslatedTypeParameterCount;
|
|
57
|
+
private checkTranslatedParameterCount;
|
|
58
|
+
private areTypeParameterEntitiesEqualToTranslationTypeParameters;
|
|
59
|
+
private areParameterEntitiesEqualToTranslationParameters;
|
|
60
|
+
private createNotTranslatedEntitiesDiagnostic;
|
|
61
|
+
private createTranslatedDefaultConstructorEntity;
|
|
62
|
+
private tryCreateAutomaticTranslationOfDerivedTypeMember;
|
|
63
|
+
private translationsDeclarations;
|
|
64
|
+
}
|
|
65
|
+
export interface TranslationTargets<T extends Entity = Entity> {
|
|
66
|
+
readonly values: readonly T[];
|
|
67
|
+
readonly areSuitable: boolean;
|
|
68
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LocalVariableEntity } from '../../entities/index.js';
|
|
2
|
+
import * as tree from '../../tree/m/index.js';
|
|
3
|
+
import * as types from '../../types/index.js';
|
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
|
5
|
+
export declare class ReturnTypeInferrer {
|
|
6
|
+
private readonly analyzer;
|
|
7
|
+
private readonly block;
|
|
8
|
+
private readonly resultVariable;
|
|
9
|
+
constructor(analyzer: Analyzer, block: tree.FunctionBlock, resultVariable: LocalVariableEntity | undefined);
|
|
10
|
+
infer(): types.Type;
|
|
11
|
+
private checkResultVariableIsUsedAndCollectReturnedTypes;
|
|
12
|
+
private getTypeOfResultVariableAtTheEndOfSubprogram;
|
|
13
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { TaskController } from '../../common/index.js';
|
|
2
|
+
import { Diagnostic } from '../../diagnostic/Diagnostic.js';
|
|
3
|
+
import * as project from '../../project/index.js';
|
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
|
5
|
+
export declare class SourceFileAnalyzer {
|
|
6
|
+
private readonly analyzer;
|
|
7
|
+
private readonly sourceFile;
|
|
8
|
+
private readonly diagnosticArgumentFactory;
|
|
9
|
+
private readonly translationPackage_;
|
|
10
|
+
private readonly textTranslationPackage_;
|
|
11
|
+
private readonly diagnostics;
|
|
12
|
+
private readonly diagnosticAcceptor;
|
|
13
|
+
private namedDeclarationsUsageMap;
|
|
14
|
+
private readonly overrideChecker;
|
|
15
|
+
private readonly standardTypes_;
|
|
16
|
+
private get resolvedTranslationPackage();
|
|
17
|
+
private get textTranslationPackage();
|
|
18
|
+
private get isInterfacePackageFile();
|
|
19
|
+
private get standardTypes();
|
|
20
|
+
constructor(analyzer: Analyzer, sourceFile: project.SourceFileM);
|
|
21
|
+
analyze(taskController: TaskController): Promise<Diagnostic[]>;
|
|
22
|
+
private analyzeNode;
|
|
23
|
+
private checkTag;
|
|
24
|
+
private checkPackageAliasTypeDeclaration;
|
|
25
|
+
private checkTranslationsDeclaration;
|
|
26
|
+
private addNotTranslatedTextsDiagnostics;
|
|
27
|
+
private collectNotTranslatedTexts;
|
|
28
|
+
private createNotTranslatedTextsDiagnostic;
|
|
29
|
+
private checkTextTranslationDeclaration;
|
|
30
|
+
private checkPackageTypeDeclaration;
|
|
31
|
+
private checkAllFieldsOfStructureAreConst;
|
|
32
|
+
private checkStructureHasRecursiveLayout;
|
|
33
|
+
private checkStructureIsReferencedByFieldTypeRecursively;
|
|
34
|
+
private checkStructureIsReferencedByFieldsOfStructure;
|
|
35
|
+
private isReferencedAutomaticallyGeneratedBackingVariable;
|
|
36
|
+
private checkBaseObjectTypeHasAccessibleConstructors;
|
|
37
|
+
private checkAspectsHaveNotBeenExtendedWithDifferentTypeArguments;
|
|
38
|
+
private checkPackageVariableDeclaration;
|
|
39
|
+
private checkPackageFunctionDeclaration;
|
|
40
|
+
private checkPackageVariableGetterDeclaration;
|
|
41
|
+
private checkPackageVariableSetterDeclaration;
|
|
42
|
+
private checkPackageMemberBodyPresence;
|
|
43
|
+
private checkMethodDeclaration;
|
|
44
|
+
private checkFieldDeclaration;
|
|
45
|
+
private checkFieldGetterDeclaration;
|
|
46
|
+
private checkFieldSetterDeclaration;
|
|
47
|
+
private checkIndexedElementGetterDeclaration;
|
|
48
|
+
private checkIndexedElementSetterDeclaration;
|
|
49
|
+
private checkTypeMemberBodyPresence;
|
|
50
|
+
private checkTypeParameterDeclarationList;
|
|
51
|
+
private checkTypeParameterDeclaration;
|
|
52
|
+
private checkNamedTypeSpecifier;
|
|
53
|
+
private checkLocalStructuredTypeDeclaration;
|
|
54
|
+
private checkLocalFunctionTypeDeclaration;
|
|
55
|
+
private checkParameterList;
|
|
56
|
+
private checkRequiredParametersDoNotFollowOptionalParameters;
|
|
57
|
+
private parameterListCanDeclareObjectParameter;
|
|
58
|
+
private checkObjectParameterIsTheFirstParameter;
|
|
59
|
+
private checkParameterDeclaration;
|
|
60
|
+
private checkReferenceExpression;
|
|
61
|
+
private checkSwitchStatement;
|
|
62
|
+
private checkWhileStatement;
|
|
63
|
+
private checkElseIfClause;
|
|
64
|
+
private checkIfStatement;
|
|
65
|
+
private checkArgument;
|
|
66
|
+
private checkErrorVariableDeclaration;
|
|
67
|
+
private checkForStatementVariableDeclaration;
|
|
68
|
+
private checkLocalVariableDeclaration;
|
|
69
|
+
private checkBaseExpression;
|
|
70
|
+
private checkObjectExpression;
|
|
71
|
+
private checkAssignmentStatement;
|
|
72
|
+
private checkPrefixUnaryExpression;
|
|
73
|
+
private checkCatchClause;
|
|
74
|
+
private checkForStatement;
|
|
75
|
+
private checkLocalizableTextTemplateLiteral;
|
|
76
|
+
private checkLocalizableTextLiteral;
|
|
77
|
+
private checkBinaryExpression;
|
|
78
|
+
private checkAssumptionExpression;
|
|
79
|
+
private checkStatementBlock;
|
|
80
|
+
private checkFunctionBlock;
|
|
81
|
+
private checkErrorStatement;
|
|
82
|
+
private checkBreakLoopOrContinueLoopStatement;
|
|
83
|
+
private isStatementUsedInsideLoop;
|
|
84
|
+
private checkFunctionLiteral;
|
|
85
|
+
private checkFunctionBlockLiteral;
|
|
86
|
+
private checkDereferenceExpression;
|
|
87
|
+
private checkIndexedAccessExpression;
|
|
88
|
+
private checkCallExpression;
|
|
89
|
+
private checkAllDefaultConstructorArgumentsAreNamed;
|
|
90
|
+
private checkNestedFunctionDeclaration;
|
|
91
|
+
private checkPossibleGeneratorFunctionReturnType;
|
|
92
|
+
private checkReturnStatement;
|
|
93
|
+
private checkYieldStatement;
|
|
94
|
+
private checkIdentifierExpression;
|
|
95
|
+
private checkFieldAccessWithImplicitReceiver;
|
|
96
|
+
private checkOwnFieldAccessedInConstructorIsUsedBeforeBeingAssigned;
|
|
97
|
+
private isStoredFieldConsideredInitializedAtDeclaration;
|
|
98
|
+
private checkMethodAccessWithImplicitReceiver;
|
|
99
|
+
private checkLocalOrPackageVariableUsedBeforeDeclaration;
|
|
100
|
+
private checkLocalOrPackageVariableIsUsedBeforeBeingAssigned;
|
|
101
|
+
private isLocalOrPackageVariableConsideredInitializedAtDeclaration;
|
|
102
|
+
private isLocalVariableDeclaredInTheSameSubprogramInWhichUsed;
|
|
103
|
+
private checkMemberAccessExpression;
|
|
104
|
+
private checkExpressionTypeIsAssignableToTargetType;
|
|
105
|
+
private addTypeAssignabilityDiagnosticIfBothTypesResolved;
|
|
106
|
+
private checkAssignmentIsValid;
|
|
107
|
+
private checkAssignmentToIdentifierExpression;
|
|
108
|
+
private checkAssignmentToMemberAccessExpression;
|
|
109
|
+
private checkAssignmentToVariable;
|
|
110
|
+
private checkAssignmentToPackageVariable;
|
|
111
|
+
private checkAssignmentToField;
|
|
112
|
+
private checkAssignmentToParameter;
|
|
113
|
+
private checkAssignmentToLocalVariable;
|
|
114
|
+
private checkAssignmentToObjectExpression;
|
|
115
|
+
private checkAssignmentToDereferenceExpression;
|
|
116
|
+
private checkAssignmentToIndexedAccessExpression;
|
|
117
|
+
private checkOptionalChainingIsUsedOnTheLeftSideOfAssignment;
|
|
118
|
+
private checkGenericSpecializationExpression;
|
|
119
|
+
private checkTypeArgumentTypesAreAssignableToConstraints;
|
|
120
|
+
private checkIfVariableIsUnused;
|
|
121
|
+
private checkIfNestedFunctionIsUnused;
|
|
122
|
+
private checkIfTypeParameterIsUnused;
|
|
123
|
+
private checkAllCodePathsReturnOrResultVariableIsAssigned;
|
|
124
|
+
private isReceiverBaseAutoVariableAccess;
|
|
125
|
+
private attachNodeLocationAndAddDiagnostics;
|
|
126
|
+
private createAndAddDiagnostic;
|
|
127
|
+
private addDiagnostic;
|
|
128
|
+
private addDiagnostics;
|
|
129
|
+
private addDiagnosticsLocatedInAnalyzedFile;
|
|
130
|
+
private sortAndRemoveDuplicateDiagnosticsInPlace;
|
|
131
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PackageVariableEntity } from '../../entities/index.js';
|
|
2
|
+
import * as tree from '../../tree/m/index.js';
|
|
3
|
+
import { Analyzer } from './Analyzer.js';
|
|
4
|
+
export declare class SourcePackageMembersCreator {
|
|
5
|
+
static createComputedPackageVariableEntities(analyzer: Analyzer, members: Iterable<tree.PackageSingleMemberDeclaration>, entities: Map<tree.Node, PackageVariableEntity>): void;
|
|
6
|
+
private static processPackageVariableAccessorDeclarations;
|
|
7
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FieldEntity, IndexerEntity } from '../../entities/index.js';
|
|
2
|
+
import * as tree from '../../tree/m/index.js';
|
|
3
|
+
import { Analyzer } from './Analyzer.js';
|
|
4
|
+
export declare class SourceTypeMembersCreator {
|
|
5
|
+
static createComputedFieldEntities(analyzer: Analyzer, members: Iterable<tree.TypeSingleMemberDeclaration | tree.StaticDeclaration>, entities: Map<tree.Node, FieldEntity>): void;
|
|
6
|
+
static createIndexerEntities(analyzer: Analyzer, members: Iterable<tree.TypeSingleMemberDeclaration>, entities: Map<tree.Node, IndexerEntity>): void;
|
|
7
|
+
private static processFieldAccessorDeclarations;
|
|
8
|
+
private static processIndexedElementAccessorDeclarations;
|
|
9
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as tree from '../../tree/m/index.js';
|
|
2
|
+
import * as e from '../../entities/index.js';
|
|
3
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
|
5
|
+
import { ResolvedQualifier } from './NamedTypeResolver.js';
|
|
6
|
+
export declare class Resolver {
|
|
7
|
+
private readonly analyzer;
|
|
8
|
+
private readonly node;
|
|
9
|
+
private readonly diagnostics;
|
|
10
|
+
constructor(analyzer: Analyzer, node: tree.StaticDeclaration, diagnostics: DiagnosticAcceptor | undefined);
|
|
11
|
+
resolve(): Meaning;
|
|
12
|
+
private checkTypeParameters;
|
|
13
|
+
}
|
|
14
|
+
export type Meaning = Meaning_resolved | Meaning_ambiguous | Meaning_unresolved;
|
|
15
|
+
declare class Meaning_resolved {
|
|
16
|
+
readonly type: e.TypeEntityWithMembers;
|
|
17
|
+
readonly resolvedQualifiers: readonly ResolvedQualifier[];
|
|
18
|
+
readonly kind = "resolved";
|
|
19
|
+
constructor(type: e.TypeEntityWithMembers, resolvedQualifiers: readonly ResolvedQualifier[]);
|
|
20
|
+
}
|
|
21
|
+
declare class Meaning_ambiguous {
|
|
22
|
+
readonly entities: readonly e.NamedTypeEntity[];
|
|
23
|
+
readonly resolvedQualifiers: readonly ResolvedQualifier[];
|
|
24
|
+
readonly kind = "ambiguous";
|
|
25
|
+
constructor(entities: readonly e.NamedTypeEntity[], resolvedQualifiers: readonly ResolvedQualifier[]);
|
|
26
|
+
}
|
|
27
|
+
declare class Meaning_unresolved {
|
|
28
|
+
readonly resolvedQualifiers: readonly ResolvedQualifier[];
|
|
29
|
+
readonly kind = "unresolved";
|
|
30
|
+
constructor(resolvedQualifiers: readonly ResolvedQualifier[]);
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
2
|
+
import { NamedTypeEntity, PackageAliasEntity } from '../../entities/index.js';
|
|
3
|
+
import { Tag } from '../../tree/m/index.js';
|
|
4
|
+
import * as types from '../../types/index.js';
|
|
5
|
+
import { AccessedFunction, NotSubstitutedAccessedFunction } from '../AccessedFunction.js';
|
|
6
|
+
import { EntityOrPackageNameTreeNode } from '../EntityOrPackageNameTreeNode.js';
|
|
7
|
+
import { PackageNameTreeNode } from '../ImportedPackageNameTree.js';
|
|
8
|
+
import { Analyzer } from './Analyzer.js';
|
|
9
|
+
export declare class Resolver {
|
|
10
|
+
private readonly analyzer;
|
|
11
|
+
private readonly node;
|
|
12
|
+
private readonly diagnostics;
|
|
13
|
+
private readonly semanticContext_;
|
|
14
|
+
private get semanticContext();
|
|
15
|
+
constructor(analyzer: Analyzer, node: Tag, diagnostics: DiagnosticAcceptor | undefined);
|
|
16
|
+
resolve(): ResolutionResult;
|
|
17
|
+
private resolveNameInScope;
|
|
18
|
+
private resolveNameInPackage;
|
|
19
|
+
private resolveTagType;
|
|
20
|
+
private resolveTagFunction;
|
|
21
|
+
}
|
|
22
|
+
export declare class ResolutionResult {
|
|
23
|
+
readonly meaning: Meaning;
|
|
24
|
+
readonly resolvedQualifiers: readonly ResolvedQualifier[];
|
|
25
|
+
readonly ambiguousDeclarations?: readonly EntityOrPackageNameTreeNode[];
|
|
26
|
+
constructor(meaning: Meaning, resolvedQualifiers: readonly ResolvedQualifier[], ambiguousDeclarations?: readonly EntityOrPackageNameTreeNode[]);
|
|
27
|
+
}
|
|
28
|
+
export type Meaning = Meaning_tagType | Meaning_tagFunction | Meaning_unresolved;
|
|
29
|
+
declare class Meaning_tagType {
|
|
30
|
+
readonly type: types.Type;
|
|
31
|
+
readonly typeEntity: NamedTypeEntity | undefined;
|
|
32
|
+
readonly candidates: readonly types.Method[];
|
|
33
|
+
readonly suitableOrSingleConstructor: types.Method | undefined;
|
|
34
|
+
readonly kind = "tag-type";
|
|
35
|
+
constructor(type: types.Type, typeEntity: NamedTypeEntity | undefined, candidates: readonly types.Method[], suitableOrSingleConstructor: types.Method | undefined);
|
|
36
|
+
}
|
|
37
|
+
declare class Meaning_tagFunction {
|
|
38
|
+
readonly candidates: readonly NotSubstitutedAccessedFunction[];
|
|
39
|
+
readonly suitableOrSingleFunction: AccessedFunction | undefined;
|
|
40
|
+
readonly kind = "tag-function";
|
|
41
|
+
constructor(candidates: readonly NotSubstitutedAccessedFunction[], suitableOrSingleFunction: AccessedFunction | undefined);
|
|
42
|
+
}
|
|
43
|
+
declare class Meaning_unresolved {
|
|
44
|
+
readonly kind = "unresolved";
|
|
45
|
+
}
|
|
46
|
+
export type ResolvedQualifier = ResolvedQualifier_packageNameSegment | ResolvedQualifier_packageAlias | ResolvedQualifier_type | ResolvedQualifier_function;
|
|
47
|
+
export declare class ResolvedQualifier_packageNameSegment {
|
|
48
|
+
readonly packageTreeNode: PackageNameTreeNode;
|
|
49
|
+
readonly kind = "package-name-segment";
|
|
50
|
+
constructor(packageTreeNode: PackageNameTreeNode);
|
|
51
|
+
}
|
|
52
|
+
export declare class ResolvedQualifier_packageAlias {
|
|
53
|
+
readonly packageAlias: PackageAliasEntity;
|
|
54
|
+
readonly kind = "package-alias";
|
|
55
|
+
constructor(packageAlias: PackageAliasEntity);
|
|
56
|
+
}
|
|
57
|
+
export declare class ResolvedQualifier_type {
|
|
58
|
+
readonly candidates: readonly NamedTypeEntity[];
|
|
59
|
+
readonly suitableTypes: readonly NamedTypeEntity[];
|
|
60
|
+
readonly kind = "type";
|
|
61
|
+
get singleSuitableType(): NamedTypeEntity | undefined;
|
|
62
|
+
constructor(candidates: readonly NamedTypeEntity[], suitableTypes: readonly NamedTypeEntity[]);
|
|
63
|
+
}
|
|
64
|
+
export declare class ResolvedQualifier_function {
|
|
65
|
+
readonly candidates: readonly NotSubstitutedAccessedFunction[];
|
|
66
|
+
readonly suitableOrSingleFunction: AccessedFunction | undefined;
|
|
67
|
+
readonly kind = "function";
|
|
68
|
+
constructor(candidates: readonly NotSubstitutedAccessedFunction[], suitableOrSingleFunction: AccessedFunction | undefined);
|
|
69
|
+
}
|
|
70
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as tree from '../../tree/m/index.js';
|
|
2
|
+
export declare class TextIdentity {
|
|
3
|
+
static keyFromTextLiteralSuffix(node: tree.LocalizableTextLiteral | tree.LocalizableTextTemplateLiteral | tree.TranslationTextLiteral | tree.TranslationTextTemplate): string | undefined;
|
|
4
|
+
static keyFromLocalizableTextLiteral(node: tree.LocalizableTextLiteral): string;
|
|
5
|
+
static keyFromLocalizableTextTemplateLiteral(node: tree.LocalizableTextTemplateLiteral): string;
|
|
6
|
+
static keyFromTextTranslationSource(node: tree.TextTranslationSource): string;
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
|
|
2
|
+
import { PackageEntity } from '../../entities/index.js';
|
|
3
|
+
import { SourceFile } from '../../project/SourceFile.js';
|
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
|
5
|
+
/**
|
|
6
|
+
* Переведённые имена проверяются по следующим правилам:
|
|
7
|
+
* - Если объявления имеют одинаковые имена на исходном языке, то они должны иметь одинаковые имена на языке перевода.
|
|
8
|
+
* - Если объявления имеют разные имена на исходном языке, то они должны иметь разные имена на языке перевода.
|
|
9
|
+
* - Для членов типа: имя расширенного члена типа должно быть таким же, как имя базового члена типа.
|
|
10
|
+
*/
|
|
11
|
+
export declare class TranslatedEntityNameConflictsValidator {
|
|
12
|
+
private readonly analyzer;
|
|
13
|
+
private readonly package_;
|
|
14
|
+
private readonly packageMemberDiagnostics;
|
|
15
|
+
private arePackageMembersValidated;
|
|
16
|
+
constructor(analyzer: Analyzer, package_: PackageEntity);
|
|
17
|
+
accumulateDiagnosticForSourceFile(sourceFile: SourceFile, diagnostics: DiagnosticAcceptor): void;
|
|
18
|
+
private ensurePackageMembersAreValidated;
|
|
19
|
+
private validatePackageMembers;
|
|
20
|
+
private validateTypeMembers;
|
|
21
|
+
private checkTranslatedMembersHaveSameName;
|
|
22
|
+
private checkOriginalMembersHaveSameName;
|
|
23
|
+
private getTranslatedNameNode;
|
|
24
|
+
private validateTypeParameterNameConflicts;
|
|
25
|
+
private validateParameterNameConflicts;
|
|
26
|
+
private checkOverridingMemberHasTheSameNameAsBaseMember;
|
|
27
|
+
private getTranslationDefinitionNode;
|
|
28
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PackageEntity, TypeEntity, TypeExtensionEntity } from '../../entities/index.js';
|
|
2
|
+
import { SourceFileM, SourcePackageM } from '../../project/index.js';
|
|
3
|
+
import * as tree from '../../tree/m/index.js';
|
|
4
|
+
import { Analyzer } from './Analyzer.js';
|
|
5
|
+
export declare class TreeQuery {
|
|
6
|
+
static getSourceFile(node: tree.Node, analyzer: Analyzer): SourceFileM;
|
|
7
|
+
static getSourcePackage(node: tree.Node, analyzer: Analyzer): SourcePackageM;
|
|
8
|
+
static getPackageEntity(node: tree.Node, analyzer: Analyzer): PackageEntity;
|
|
9
|
+
}
|
|
10
|
+
export declare class TypeMemberQuery {
|
|
11
|
+
static getContainingDeclaration(node: tree.TypeMemberDeclaration): tree.TypeWithMembersOrExtensionDeclaration;
|
|
12
|
+
static getOutermostMemberBlock(node: tree.TypeMemberDeclaration): tree.TypeMemberDeclarationBlock;
|
|
13
|
+
static getContextualTypeEntity(node: tree.TypeMemberDeclaration, analyzer: Analyzer): TypeEntity | undefined;
|
|
14
|
+
static getContextualTypeOrExtensionEntity(node: tree.TypeMemberDeclaration, analyzer: Analyzer): TypeEntity | TypeExtensionEntity | undefined;
|
|
15
|
+
}
|