@artel/artc 0.6.26015 → 0.6.26017
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Cli.js +3 -3
- package/build/api/Api.js +5 -7
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +190 -290
- package/build/{chunk-XUXWFZTI.js → chunk-65XBWCU7.js} +2 -2
- package/build/{chunk-Y3SDLINT.js → chunk-SJFIPH42.js} +3202 -4216
- package/build/{chunk-LUMKCD5K.js → chunk-UCBPXOLW.js} +1 -1
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +0 -1
- package/build/types/analysis/Analyzer.d.ts +8 -29
- package/build/types/analysis/BaseExpressionMeaning.d.ts +2 -14
- package/build/types/analysis/CallExpressionMeaning.d.ts +1 -11
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +9 -21
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +2 -17
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +7 -1
- package/build/types/analysis/ReductionSourceMemberFinder.d.ts +0 -1
- package/build/types/analysis/ResolvedImplementationPackage.d.ts +1 -3
- package/build/types/analysis/SourceFileAnalyzer.d.ts +4 -1
- package/build/types/analysis/SpecialNameKey.d.ts +32 -0
- package/build/types/analysis/TypeMemberConflictsValidator.d.ts +0 -1
- package/build/types/analysis/TypeMemberLookup.d.ts +1 -5
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +1 -1
- package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +2 -2
- package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +3 -2
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +36 -21
- package/build/types/analysis/semantic-context/SemanticContextBuilder.d.ts +1 -5
- package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +3 -2
- package/build/types/analysis/semantic-context/SemanticContextWithParent.d.ts +2 -1
- package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +4 -3
- package/build/types/analysis/semantic-context/SpecialLocalDeclarationsBuilder.d.ts +0 -1
- package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +32 -22
- package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +9 -11
- package/build/types/common/Name.d.ts +3 -2
- package/build/types/diagnostic/DiagnosticCode.d.ts +110 -107
- package/build/types/emitter/Entities.d.ts +2 -0
- package/build/types/emitter/EntityMap.d.ts +0 -1
- package/build/types/emitter/IrBuilder.d.ts +1 -2
- package/build/types/emitter/IrFactory.d.ts +5 -4
- package/build/types/emitter/IrToJs.d.ts +1 -0
- package/build/types/emitter/Transformer.d.ts +2 -0
- package/build/types/emitter/ir/EmitOptions.d.ts +6 -2
- package/build/types/emitter/ir/Nodes.d.ts +110 -90
- package/build/types/emitter/ir/types.d.ts +2 -2
- package/build/types/entities/Entity.d.ts +4 -4
- package/build/types/entities/EntityLocalizationContext.d.ts +2 -3
- package/build/types/entities/OperatorKind.d.ts +20 -20
- package/build/types/entities/TypeEntityMembers.d.ts +2 -10
- package/build/types/entities/interfaces/FunctionEntity.d.ts +2 -1
- package/build/types/entities/interfaces/VariableEntity.d.ts +3 -2
- package/build/types/entities/interfaces/index.d.ts +0 -1
- package/build/types/entities/intrinsic/IntrinsicFunctionEntity.d.ts +4 -2
- package/build/types/entities/intrinsic/IntrinsicStructuredTypeEntity.d.ts +3 -3
- package/build/types/entities/intrinsic/IntrinsicVariableEntity.d.ts +3 -1
- package/build/types/entities/source/SourceFunctionEntity.d.ts +4 -1
- package/build/types/entities/source/SourceVariableEntity.d.ts +4 -0
- package/build/types/entities/source/index.d.ts +0 -1
- package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +2 -1
- package/build/types/entities/translated/TranslatedVariableEntity.d.ts +1 -0
- package/build/types/entities/translated/index.d.ts +0 -1
- package/build/types/parser/TokenKind.d.ts +1 -2
- package/build/types/services/DisplayService.d.ts +5 -27
- package/build/types/services/NodeSemanticInfo.d.ts +2 -6
- package/build/types/services/RenameService.d.ts +1 -0
- package/build/types/services/TreeUtils.d.ts +1 -1
- package/build/types/services/signature-help/SignatureWithParameters.d.ts +1 -8
- package/build/types/tree/BaseNode.d.ts +5 -5
- package/build/types/tree/Nodes.d.ts +11 -34
- package/build/types/tree/OperatorKind.d.ts +16 -17
- package/build/types/tree/SyntaxFactory.d.ts +3 -4
- package/build/types/tree/SyntaxToCode.d.ts +0 -1
- package/build/types/tree/TokenFlags.d.ts +1 -0
- package/build/types/tree/TokenKind.d.ts +1 -2
- package/build/types/tree/index.d.ts +5 -5
- package/build/types/ts-interop/Entities.d.ts +6 -2
- package/build/types/types/TypeMembers.d.ts +4 -24
- package/package.json +1 -1
- package/build/types/analysis/OperatorAccessResolver.d.ts +0 -10
- package/build/types/entities/interfaces/OperatorEntity.d.ts +0 -25
- package/build/types/entities/source/SourceOperatorEntity.d.ts +0 -42
- package/build/types/entities/translated/TranslatedOperatorEntity.d.ts +0 -54
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Name } from '../../common/index.js';
|
|
2
|
-
import { ConstructorEntity,
|
|
2
|
+
import { ConstructorEntity, PackageEntity, ParameterEntity, TextTranslationEntity, TypeEntity, TypeEntityWithMembers, TypeExtensionEntity } from '../../entities/index.js';
|
|
3
3
|
import { SourceFile } from '../../project/SourceFile.js';
|
|
4
4
|
import * as tree from '../../tree/index.js';
|
|
5
5
|
import * as types from '../../types/index.js';
|
|
@@ -12,21 +12,21 @@ import { TypeMemberLookupContext } from '../TypeMemberLookup.js';
|
|
|
12
12
|
import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
|
|
13
13
|
import { SemanticContext } from './SemanticContext.js';
|
|
14
14
|
export declare abstract class SemanticContextBase {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
protected static readonly emptyTypeExtensions: readonly TypeExtensionEntity[];
|
|
15
|
+
static readonly emptyTypesOrContainersWithTypes: readonly TypeOrContainerWithTypes[];
|
|
16
|
+
static readonly emptyNamedDeclarations: readonly NamedDeclaration[];
|
|
17
|
+
static readonly emptyTypeExtensions: readonly TypeExtensionEntity[];
|
|
19
18
|
abstract readonly outer: SemanticContext | undefined;
|
|
20
19
|
protected abstract readonly asContext: SemanticContext;
|
|
21
20
|
abstract getContainingSubprogram(): SubprogramInfo | undefined;
|
|
22
21
|
abstract getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
|
|
22
|
+
abstract getObjectVariableInfo(): ObjectVariableInfo | undefined;
|
|
23
23
|
abstract getTryStatementContext(): TryStatementContextKind | undefined;
|
|
24
24
|
abstract isStatic(): boolean;
|
|
25
25
|
abstract getTypeMemberLookupContext(): TypeMemberLookupContext;
|
|
26
26
|
abstract getOwnTypesOrContainersWithTypes(initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
|
|
27
27
|
abstract getOwnTypesOrContainersWithTypesByName(name: Name, initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
|
|
28
|
-
abstract getOwnNamedDeclarations(initialContext: SemanticContext, noInstanceMembers: boolean): readonly NamedDeclaration[];
|
|
29
|
-
abstract getOwnNamedDeclarationsByName(name: Name, initialContext: SemanticContext, noInstanceMembers: boolean):
|
|
28
|
+
abstract getOwnNamedDeclarations(initialContext: SemanticContext, noInstanceMembers: boolean, lookupState: SemanticContextLookupState): readonly NamedDeclaration[];
|
|
29
|
+
abstract getOwnNamedDeclarationsByName(name: Name, initialContext: SemanticContext, noInstanceMembers: boolean, lookupResult: NamedDeclarationLookupResult): void;
|
|
30
30
|
getContainingSourceFile(): SourceFile;
|
|
31
31
|
getContainingPackage(): PackageEntity;
|
|
32
32
|
getDiagnosticArgumentFactory(): DiagnosticArgumentFactory;
|
|
@@ -34,15 +34,13 @@ export declare abstract class SemanticContextBase {
|
|
|
34
34
|
getTypesOrContainersWithTypes(): readonly TypeOrContainerWithTypes[];
|
|
35
35
|
getTypesOrContainersWithTypesByName(name: Name): readonly TypeOrContainerWithTypes[];
|
|
36
36
|
getNamedDeclarations(noInstanceMembers?: boolean): readonly NamedDeclaration[];
|
|
37
|
-
getNamedDeclarationsByName(name: Name, noInstanceMembers?: boolean):
|
|
38
|
-
getOperators(noInstanceMembers?: boolean): readonly types.Operator[];
|
|
39
|
-
getOperatorsByKind(kind: OperatorKind, noInstanceMembers?: boolean): readonly types.Operator[];
|
|
37
|
+
getNamedDeclarationsByName(name: Name, noInstanceMembers?: boolean): NamedDeclarationLookupResult;
|
|
40
38
|
getTypeExtensionsByType(type: TypeEntity): readonly TypeExtensionEntity[];
|
|
41
39
|
getTextTranslationEntityByTextKey(key: TextKey): readonly TextTranslationEntity[];
|
|
42
40
|
private semanticContexts;
|
|
43
41
|
private getSourceFileContext;
|
|
44
42
|
}
|
|
45
|
-
export type SubprogramInfo = SubprogramInfo.Function | SubprogramInfo.
|
|
43
|
+
export type SubprogramInfo = SubprogramInfo.Function | SubprogramInfo.Constructor | SubprogramInfo.Destructor | SubprogramInfo.Getter | SubprogramInfo.Setter | SubprogramInfo.PackageConstructor | SubprogramInfo.PackageEntryPoint | SubprogramInfo.FunctionLiteral | SubprogramInfo.TextTranslationFunction;
|
|
46
44
|
export declare namespace SubprogramInfo {
|
|
47
45
|
export class Function implements ISubprogramInfo {
|
|
48
46
|
readonly kind = "function";
|
|
@@ -55,16 +53,6 @@ export declare namespace SubprogramInfo {
|
|
|
55
53
|
getNode(): FunctionDeclaration;
|
|
56
54
|
private getEntity;
|
|
57
55
|
}
|
|
58
|
-
export class Operator implements ISubprogramInfo {
|
|
59
|
-
readonly kind = "operator";
|
|
60
|
-
private readonly analyzer;
|
|
61
|
-
private readonly node;
|
|
62
|
-
constructor(analyzer: Analyzer, node: tree.OperatorDeclaration);
|
|
63
|
-
getReturnType(): types.Type | undefined;
|
|
64
|
-
isGenerator(): boolean;
|
|
65
|
-
allowsAsyncCalls(): boolean;
|
|
66
|
-
getNode(): tree.OperatorDeclaration;
|
|
67
|
-
}
|
|
68
56
|
export class Constructor implements ISubprogramInfo {
|
|
69
57
|
readonly kind = "constructor";
|
|
70
58
|
private readonly analyzer;
|
|
@@ -179,7 +167,34 @@ export declare namespace TypeOrTypeExtension {
|
|
|
179
167
|
}
|
|
180
168
|
export {};
|
|
181
169
|
}
|
|
170
|
+
export type ObjectVariableInfo = ObjectVariableInfo.ContainingTypeContext | ObjectVariableInfo.ObjectParameter;
|
|
171
|
+
export declare namespace ObjectVariableInfo {
|
|
172
|
+
class ContainingTypeContext {
|
|
173
|
+
readonly typeOrExtension: TypeOrTypeExtension;
|
|
174
|
+
readonly kind = "containing-type-context";
|
|
175
|
+
constructor(typeOrExtension: TypeOrTypeExtension);
|
|
176
|
+
}
|
|
177
|
+
class ObjectParameter {
|
|
178
|
+
readonly parameter: ParameterEntity;
|
|
179
|
+
readonly kind = "object-parameter";
|
|
180
|
+
constructor(parameter: ParameterEntity);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
182
183
|
export declare enum TryStatementContextKind {
|
|
183
184
|
InTryBlockWithCatchClause = 0,
|
|
184
185
|
InFinallyBlock = 1
|
|
185
186
|
}
|
|
187
|
+
export declare class SemanticContextLookupState {
|
|
188
|
+
hasSearchedInObjectVariable: boolean;
|
|
189
|
+
}
|
|
190
|
+
export declare class NamedDeclarationLookupResult {
|
|
191
|
+
hasSearchedInObjectVariable: boolean;
|
|
192
|
+
private declarations_;
|
|
193
|
+
private objectParameter_;
|
|
194
|
+
get declarations(): readonly NamedDeclaration[];
|
|
195
|
+
/**
|
|
196
|
+
* Параметр "объект", в типе которого были найден объявления.
|
|
197
|
+
*/
|
|
198
|
+
get objectParameter(): ParameterEntity | undefined;
|
|
199
|
+
setDeclarations(declarations: readonly NamedDeclaration[], objectParameter: ParameterEntity | undefined): void;
|
|
200
|
+
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as tree from '../../tree/index.js';
|
|
2
2
|
import { Analyzer } from '../Analyzer.js';
|
|
3
3
|
import { FunctionDeclaration, FunctionTypeDeclaration, IndexedElementAccessorDeclaration, PackageTypeDeclaration, RegularOrBlockFunctionLiteral, SubprogramDeclarationOrLiteral } from '../NodeTypeUtils.js';
|
|
4
|
-
import { CatchClauseSemanticContext, ConstructorSemanticContext, DestructorSemanticContext, ForStatementSemanticContext, FunctionLiteralSemanticContext, FunctionSemanticContext, IndexedElementAccessorSemanticContext,
|
|
4
|
+
import { CatchClauseSemanticContext, ConstructorSemanticContext, DestructorSemanticContext, ForStatementSemanticContext, FunctionLiteralSemanticContext, FunctionSemanticContext, IndexedElementAccessorSemanticContext, OutermostSemanticContextOfSubprogram, OutermostSemanticContextOfType, PackageConstructorSemanticContext, PackageEntryPointSemanticContext, ParametersOfFunctionTypeSemanticContext, SemanticContext, SemanticContextContainingTypeMember, SourceFileSemanticContext, SpecialLocalDeclarationSemanticContext, StatementBlockSemanticContext, SubprogramParameterListSemanticContext, SubprogramTypeParameterSemanticContext, TextTranslationFunctionDeclarationSemanticContext, TypeBodySemanticContext, TypeDeclarationCreatingSemanticContext, TypeDeclarationWithMemberBlock, TypeExtensionBodySemanticContext, TypeParametersOfTypeSemanticContext, VariableAccessorDeclaration, VariableAccessorSemanticContext } from '../semantic-context/index.js';
|
|
5
5
|
export declare class SemanticContextBuilder {
|
|
6
6
|
private readonly analyzer;
|
|
7
7
|
private readonly sourceFileContexts;
|
|
8
8
|
private readonly indexedElementAccessorContexts;
|
|
9
|
-
private readonly operatorContexts;
|
|
10
9
|
private readonly fieldWithInitializerContexts;
|
|
11
10
|
private readonly forStatementContexts;
|
|
12
11
|
private readonly catchClauseSemanticContexts;
|
|
@@ -39,8 +38,6 @@ export declare class SemanticContextBuilder {
|
|
|
39
38
|
ofFunctionDeclarationParameters(node: FunctionDeclaration): SubprogramParameterListSemanticContext;
|
|
40
39
|
ofFunctionDeclarationTypeParameters(node: FunctionDeclaration, typeParameterClause: tree.TypeParameterClause): SubprogramTypeParameterSemanticContext;
|
|
41
40
|
outermostSemanticContextOfFunctionDeclaration(node: FunctionDeclaration): FunctionSemanticContext;
|
|
42
|
-
ofOperatorDeclarationParameters(node: tree.OperatorDeclaration): SubprogramParameterListSemanticContext;
|
|
43
|
-
outermostSemanticContextOfOperatorDeclaration(node: tree.OperatorDeclaration): OperatorSemanticContext;
|
|
44
41
|
ofTypeDeclarationMemberBlock(typeDeclaration: TypeDeclarationWithMemberBlock, memberBlock: tree.TypeMemberDeclarationBlock): TypeBodySemanticContext;
|
|
45
42
|
ofFunctionTypeDeclarationParameters(node: FunctionTypeDeclaration): ParametersOfFunctionTypeSemanticContext;
|
|
46
43
|
outermostSemanticContextOfTypeDeclaration(node: TypeDeclarationCreatingSemanticContext): OutermostSemanticContextOfType;
|
|
@@ -75,7 +72,6 @@ export declare class SemanticContextBuilder {
|
|
|
75
72
|
private ofChildOfTypeDeclarationWithMemberBlock2;
|
|
76
73
|
private ofChildOfAnonymousFunctionTypeDeclaration;
|
|
77
74
|
private ofChildOfFunctionLiteral;
|
|
78
|
-
private ofOperatorDeclarationChild;
|
|
79
75
|
private ofConstructorDeclarationChild;
|
|
80
76
|
private ofDestructorDeclarationChild;
|
|
81
77
|
private ofIndexedElementGetterDeclarationChild;
|
|
@@ -5,6 +5,7 @@ import * as tree from '../../tree/index.js';
|
|
|
5
5
|
import { Analyzer } from '../Analyzer.js';
|
|
6
6
|
import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
|
|
7
7
|
import { SemanticContext } from './SemanticContext.js';
|
|
8
|
+
import { NamedDeclarationLookupResult, SemanticContextLookupState } from './SemanticContextBase.js';
|
|
8
9
|
import { SemanticContextWithParent } from './SemanticContextWithParent.js';
|
|
9
10
|
export interface NameConflictsValidator {
|
|
10
11
|
validateNameConflicts(diagnostics: DiagnosticAcceptor): void;
|
|
@@ -29,8 +30,8 @@ export declare abstract class SemanticContextValidatingNameConflictsBase extends
|
|
|
29
30
|
protected abstract createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
|
|
30
31
|
getOwnTypesOrContainersWithTypes(_initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
|
|
31
32
|
getOwnTypesOrContainersWithTypesByName(name: Name, _initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
|
|
32
|
-
getOwnNamedDeclarations(_initialContext: SemanticContext, _noInstanceMembers: boolean): readonly NamedDeclaration[];
|
|
33
|
-
getOwnNamedDeclarationsByName(name: Name, _initialContext: SemanticContext, _noInstanceMembers: boolean):
|
|
33
|
+
getOwnNamedDeclarations(_initialContext: SemanticContext, _noInstanceMembers: boolean, _lookupState: SemanticContextLookupState): readonly NamedDeclaration[];
|
|
34
|
+
getOwnNamedDeclarationsByName(name: Name, _initialContext: SemanticContext, _noInstanceMembers: boolean, lookupResult: NamedDeclarationLookupResult): void;
|
|
34
35
|
validateNameConflicts(diagnostics: DiagnosticAcceptor): void;
|
|
35
36
|
private getMemberEntityDictionary;
|
|
36
37
|
private validateNestedFunctionsConflicts;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { TypeMemberLookupContext } from '../TypeMemberLookup.js';
|
|
2
2
|
import { SemanticContext } from './SemanticContext.js';
|
|
3
|
-
import { SemanticContextBase, SubprogramInfo, TryStatementContextKind, TypeOrTypeExtension } from './SemanticContextBase.js';
|
|
3
|
+
import { ObjectVariableInfo, SemanticContextBase, SubprogramInfo, TryStatementContextKind, TypeOrTypeExtension } from './SemanticContextBase.js';
|
|
4
4
|
export declare abstract class SemanticContextWithParent extends SemanticContextBase {
|
|
5
5
|
abstract readonly outer: SemanticContext;
|
|
6
6
|
getContainingSubprogram(): SubprogramInfo | undefined;
|
|
7
7
|
getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
|
|
8
|
+
getObjectVariableInfo(): ObjectVariableInfo | undefined;
|
|
8
9
|
getTryStatementContext(): TryStatementContextKind | undefined;
|
|
9
10
|
isStatic(): boolean;
|
|
10
11
|
getTypeMemberLookupContext(): TypeMemberLookupContext;
|
|
@@ -10,7 +10,7 @@ import { TextKey } from '../TextIdentity.js';
|
|
|
10
10
|
import { TypeMemberLookupContext } from '../TypeMemberLookup.js';
|
|
11
11
|
import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
|
|
12
12
|
import { SemanticContext } from './SemanticContext.js';
|
|
13
|
-
import { SemanticContextBase, SubprogramInfo, TryStatementContextKind, TypeOrTypeExtension } from './SemanticContextBase.js';
|
|
13
|
+
import { NamedDeclarationLookupResult, ObjectVariableInfo, SemanticContextBase, SemanticContextLookupState, SubprogramInfo, TryStatementContextKind, TypeOrTypeExtension } from './SemanticContextBase.js';
|
|
14
14
|
export declare class SourceFileSemanticContext extends SemanticContextBase {
|
|
15
15
|
readonly kind = "source-file";
|
|
16
16
|
readonly outer: SemanticContext | undefined;
|
|
@@ -33,6 +33,7 @@ export declare class SourceFileSemanticContext extends SemanticContextBase {
|
|
|
33
33
|
constructor(analyzer: Analyzer, node: tree.SourceFile);
|
|
34
34
|
getContainingSubprogram(): SubprogramInfo | undefined;
|
|
35
35
|
getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
|
|
36
|
+
getObjectVariableInfo(): ObjectVariableInfo | undefined;
|
|
36
37
|
getSourceFile(): SourceFile;
|
|
37
38
|
getPackage(): PackageEntity;
|
|
38
39
|
getTryStatementContext(): TryStatementContextKind | undefined;
|
|
@@ -42,8 +43,8 @@ export declare class SourceFileSemanticContext extends SemanticContextBase {
|
|
|
42
43
|
getDiagnosticArgumentFactory(): DiagnosticArgumentFactory;
|
|
43
44
|
getOwnTypesOrContainersWithTypes(initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
|
|
44
45
|
getOwnTypesOrContainersWithTypesByName(name: Name, initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
|
|
45
|
-
getOwnNamedDeclarations(initialContext: SemanticContext, _noInstanceMembers: boolean): NamedDeclaration[];
|
|
46
|
-
getOwnNamedDeclarationsByName(name: Name, initialContext: SemanticContext, _noInstanceMembers: boolean):
|
|
46
|
+
getOwnNamedDeclarations(initialContext: SemanticContext, _noInstanceMembers: boolean, _lookupState: SemanticContextLookupState): NamedDeclaration[];
|
|
47
|
+
getOwnNamedDeclarationsByName(name: Name, initialContext: SemanticContext, _noInstanceMembers: boolean, lookupResult: NamedDeclarationLookupResult): void;
|
|
47
48
|
getOwnTypeExtensionsByType(type: TypeEntity, initialContext: SemanticContext): TypeExtensionEntity[];
|
|
48
49
|
getTextTranslationEntityByTextKey(key: TextKey): readonly TextTranslationEntity[];
|
|
49
50
|
validateNameConflicts(diagnostics: DiagnosticAcceptor): void;
|
|
@@ -18,7 +18,6 @@ export declare class SpecialLocalDeclarationsBuilder {
|
|
|
18
18
|
static buildForFunctionLiteral(analyzer: Analyzer, node: tree.FunctionLiteral): readonly SpecialLocalDeclarationEntity[];
|
|
19
19
|
static buildForConstructorDeclaration(analyzer: Analyzer, node: tree.ConstructorDeclaration): readonly SpecialLocalDeclarationEntity[];
|
|
20
20
|
static buildForMethodDeclaration(analyzer: Analyzer, node: tree.MethodDeclaration): readonly SpecialLocalDeclarationEntity[];
|
|
21
|
-
static buildForOperatorDeclaration(analyzer: Analyzer, node: tree.OperatorDeclaration): readonly SpecialLocalDeclarationEntity[];
|
|
22
21
|
static buildForTextTranslationFunctionDeclaration(analyzer: Analyzer, node: tree.TextTranslationFunctionDeclaration): readonly SpecialLocalDeclarationEntity[];
|
|
23
22
|
}
|
|
24
23
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Name } from '../../common/index.js';
|
|
2
|
+
import { ParameterEntity } from '../../entities/index.js';
|
|
2
3
|
import * as tree from '../../tree/index.js';
|
|
3
4
|
import { Analyzer } from '../Analyzer.js';
|
|
4
5
|
import { DereferencedVariableAccessorDeclaration, FieldAccessorDeclaration, FunctionDeclaration, IndexedElementAccessorDeclaration, PackageVariableAccessorDeclaration, RegularOrBlockFunctionLiteral } from '../NodeTypeUtils.js';
|
|
5
6
|
import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
|
|
6
7
|
import { SemanticContext } from './SemanticContext.js';
|
|
7
|
-
import { SubprogramInfo, TryStatementContextKind } from './SemanticContextBase.js';
|
|
8
|
+
import { NamedDeclarationLookupResult, ObjectVariableInfo, SemanticContextLookupState, SubprogramInfo, TryStatementContextKind } from './SemanticContextBase.js';
|
|
8
9
|
import { SemanticContextWithParent } from './SemanticContextWithParent.js';
|
|
9
10
|
import { SourceFileSemanticContext } from './SourceFileSemanticContext.js';
|
|
10
11
|
import { SemanticContextContainingTypeMember } from './TypeSemanticContext.js';
|
|
@@ -16,106 +17,115 @@ export type LastSemanticContextOfSubprogramParent = SemanticContext;
|
|
|
16
17
|
*/
|
|
17
18
|
export declare abstract class OutermostSemanticContextOfSubprogram extends SemanticContextWithParent {
|
|
18
19
|
readonly kind = "outermost-of-subprogram";
|
|
20
|
+
protected abstract readonly analyzer: Analyzer;
|
|
21
|
+
private readonly objectVariableInfo;
|
|
22
|
+
private readonly objectParameter_;
|
|
23
|
+
private readonly objectParameterMemberLookup_;
|
|
24
|
+
private get objectParameter();
|
|
25
|
+
private get objectParameterMemberLookup();
|
|
19
26
|
abstract getContainingSubprogram(): SubprogramInfo;
|
|
27
|
+
protected abstract findObjectParameter(): ParameterEntity | undefined;
|
|
28
|
+
getObjectVariableInfo(): ObjectVariableInfo | undefined;
|
|
20
29
|
getTryStatementContext(): TryStatementContextKind | undefined;
|
|
21
30
|
getOwnTypesOrContainersWithTypes(_initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
|
|
22
31
|
getOwnTypesOrContainersWithTypesByName(_name: Name, _initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
|
|
23
|
-
getOwnNamedDeclarations(
|
|
24
|
-
getOwnNamedDeclarationsByName(
|
|
32
|
+
getOwnNamedDeclarations(initialContext: SemanticContext, noInstanceMembers: boolean, lookupState: SemanticContextLookupState): readonly NamedDeclaration[];
|
|
33
|
+
getOwnNamedDeclarationsByName(name: Name, initialContext: SemanticContext, noInstanceMembers: boolean, lookupResult: NamedDeclarationLookupResult): void;
|
|
34
|
+
private convertNamedMember;
|
|
25
35
|
}
|
|
26
36
|
export declare class FunctionSemanticContext extends OutermostSemanticContextOfSubprogram {
|
|
27
37
|
readonly outer: SemanticContext;
|
|
28
38
|
protected readonly asContext: SemanticContext;
|
|
29
|
-
|
|
39
|
+
protected readonly analyzer: Analyzer;
|
|
30
40
|
private readonly node;
|
|
31
41
|
private readonly subprogramInfo;
|
|
32
42
|
constructor(analyzer: Analyzer, node: FunctionDeclaration, outer: SemanticContext);
|
|
33
43
|
getContainingSubprogram(): SubprogramInfo;
|
|
34
44
|
isStatic(): boolean;
|
|
45
|
+
protected findObjectParameter(): ParameterEntity | undefined;
|
|
46
|
+
private getEntity;
|
|
35
47
|
}
|
|
36
48
|
export declare class PackageConstructorSemanticContext extends OutermostSemanticContextOfSubprogram {
|
|
37
49
|
readonly outer: SourceFileSemanticContext;
|
|
38
50
|
protected readonly asContext: SemanticContext;
|
|
39
|
-
|
|
51
|
+
protected readonly analyzer: Analyzer;
|
|
40
52
|
private readonly node;
|
|
41
53
|
private readonly subprogramInfo;
|
|
42
54
|
constructor(analyzer: Analyzer, node: tree.PackageConstructorDeclaration, outer: SourceFileSemanticContext);
|
|
43
55
|
getContainingSubprogram(): SubprogramInfo;
|
|
56
|
+
protected findObjectParameter(): ParameterEntity | undefined;
|
|
44
57
|
}
|
|
45
58
|
export declare class PackageEntryPointSemanticContext extends OutermostSemanticContextOfSubprogram {
|
|
46
59
|
readonly outer: SourceFileSemanticContext;
|
|
47
60
|
protected readonly asContext: SemanticContext;
|
|
48
|
-
|
|
61
|
+
protected readonly analyzer: Analyzer;
|
|
49
62
|
private readonly node;
|
|
50
63
|
private readonly subprogramInfo;
|
|
51
64
|
constructor(analyzer: Analyzer, node: tree.PackageEntryPointDeclaration, outer: SourceFileSemanticContext);
|
|
52
65
|
getContainingSubprogram(): SubprogramInfo;
|
|
53
|
-
|
|
54
|
-
export declare class OperatorSemanticContext extends OutermostSemanticContextOfSubprogram {
|
|
55
|
-
readonly outer: SemanticContextContainingTypeMember;
|
|
56
|
-
protected readonly asContext: SemanticContext;
|
|
57
|
-
private readonly analyzer;
|
|
58
|
-
private readonly node;
|
|
59
|
-
private readonly subprogramInfo;
|
|
60
|
-
constructor(analyzer: Analyzer, node: tree.OperatorDeclaration, outer: SemanticContextContainingTypeMember);
|
|
61
|
-
getContainingSubprogram(): SubprogramInfo;
|
|
62
|
-
isStatic(): boolean;
|
|
66
|
+
protected findObjectParameter(): ParameterEntity | undefined;
|
|
63
67
|
}
|
|
64
68
|
export declare class ConstructorSemanticContext extends OutermostSemanticContextOfSubprogram {
|
|
65
69
|
readonly outer: SemanticContextContainingTypeMember;
|
|
66
70
|
protected readonly asContext: SemanticContext;
|
|
67
|
-
|
|
71
|
+
protected readonly analyzer: Analyzer;
|
|
68
72
|
private readonly node;
|
|
69
73
|
private readonly subprogramInfo;
|
|
70
74
|
constructor(analyzer: Analyzer, node: tree.ConstructorDeclaration, outer: SemanticContextContainingTypeMember);
|
|
71
75
|
getContainingSubprogram(): SubprogramInfo;
|
|
76
|
+
protected findObjectParameter(): ParameterEntity | undefined;
|
|
72
77
|
}
|
|
73
78
|
export declare class DestructorSemanticContext extends OutermostSemanticContextOfSubprogram {
|
|
74
79
|
readonly outer: SemanticContextContainingTypeMember;
|
|
75
80
|
protected readonly asContext: SemanticContext;
|
|
76
|
-
|
|
81
|
+
protected readonly analyzer: Analyzer;
|
|
77
82
|
private readonly node;
|
|
78
83
|
private readonly subprogramInfo;
|
|
79
84
|
constructor(analyzer: Analyzer, node: tree.DestructorDeclaration, outer: SemanticContextContainingTypeMember);
|
|
80
85
|
getContainingSubprogram(): SubprogramInfo;
|
|
86
|
+
protected findObjectParameter(): ParameterEntity | undefined;
|
|
81
87
|
}
|
|
82
88
|
export type AccessorSemanticContextParent = SemanticContextContainingTypeMember | SourceFileSemanticContext;
|
|
83
89
|
export type VariableAccessorDeclaration = PackageVariableAccessorDeclaration | FieldAccessorDeclaration | DereferencedVariableAccessorDeclaration;
|
|
84
90
|
export declare class VariableAccessorSemanticContext extends OutermostSemanticContextOfSubprogram {
|
|
85
91
|
readonly outer: AccessorSemanticContextParent;
|
|
86
92
|
protected readonly asContext: SemanticContext;
|
|
87
|
-
|
|
93
|
+
protected readonly analyzer: Analyzer;
|
|
88
94
|
private readonly node;
|
|
89
95
|
private readonly subprogramInfo;
|
|
90
96
|
constructor(analyzer: Analyzer, node: VariableAccessorDeclaration, outer: AccessorSemanticContextParent);
|
|
91
97
|
getContainingSubprogram(): SubprogramInfo;
|
|
92
98
|
isStatic(): boolean;
|
|
99
|
+
protected findObjectParameter(): ParameterEntity | undefined;
|
|
93
100
|
}
|
|
94
101
|
export declare class IndexedElementAccessorSemanticContext extends OutermostSemanticContextOfSubprogram {
|
|
95
102
|
readonly outer: AccessorSemanticContextParent;
|
|
96
103
|
protected readonly asContext: SemanticContext;
|
|
97
|
-
|
|
104
|
+
protected readonly analyzer: Analyzer;
|
|
98
105
|
private readonly node;
|
|
99
106
|
private readonly subprogramInfo;
|
|
100
107
|
constructor(analyzer: Analyzer, node: IndexedElementAccessorDeclaration, outer: AccessorSemanticContextParent);
|
|
101
108
|
getContainingSubprogram(): SubprogramInfo;
|
|
102
109
|
isStatic(): boolean;
|
|
110
|
+
protected findObjectParameter(): ParameterEntity | undefined;
|
|
103
111
|
}
|
|
104
112
|
export declare class FunctionLiteralSemanticContext extends OutermostSemanticContextOfSubprogram {
|
|
105
113
|
readonly outer: SemanticContext;
|
|
106
114
|
protected readonly asContext: SemanticContext;
|
|
107
|
-
|
|
115
|
+
protected readonly analyzer: Analyzer;
|
|
108
116
|
private readonly node;
|
|
109
117
|
private readonly subprogramInfo;
|
|
110
118
|
constructor(analyzer: Analyzer, node: RegularOrBlockFunctionLiteral, outer: SemanticContext);
|
|
111
119
|
getContainingSubprogram(): SubprogramInfo;
|
|
120
|
+
protected findObjectParameter(): ParameterEntity | undefined;
|
|
112
121
|
}
|
|
113
122
|
export declare class TextTranslationFunctionDeclarationSemanticContext extends OutermostSemanticContextOfSubprogram {
|
|
114
123
|
readonly outer: SemanticContext;
|
|
115
124
|
protected readonly asContext: SemanticContext;
|
|
116
|
-
|
|
125
|
+
protected readonly analyzer: Analyzer;
|
|
117
126
|
private readonly node;
|
|
118
127
|
private readonly subprogramInfo;
|
|
119
128
|
constructor(analyzer: Analyzer, node: tree.TextTranslationFunctionDeclaration, outer: SemanticContext);
|
|
120
129
|
getContainingSubprogram(): SubprogramInfo;
|
|
130
|
+
protected findObjectParameter(): ParameterEntity | undefined;
|
|
121
131
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { Name } from '../../common/index.js';
|
|
2
|
-
import { OperatorKind } from '../../entities/index.js';
|
|
3
2
|
import * as tree from '../../tree/index.js';
|
|
4
|
-
import * as types from '../../types/index.js';
|
|
5
3
|
import { Analyzer } from '../Analyzer.js';
|
|
6
4
|
import { FunctionTypeDeclaration, StructuredTypeDeclaration, TypeDeclaration, VariantTypeDeclaration } from '../NodeTypeUtils.js';
|
|
7
5
|
import { TypeMemberLookup, TypeMemberLookupContext } from '../TypeMemberLookup.js';
|
|
8
6
|
import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
|
|
9
7
|
import { SemanticContext } from './SemanticContext.js';
|
|
10
|
-
import { SubprogramInfo, TypeOrTypeExtension } from './SemanticContextBase.js';
|
|
8
|
+
import { NamedDeclarationLookupResult, ObjectVariableInfo, SemanticContextLookupState, SubprogramInfo, TypeOrTypeExtension } from './SemanticContextBase.js';
|
|
11
9
|
import { MemberOfSemanticContextValidatingNameConflicts, MemberOfSemanticContextValidatingNameConflictsForTypeLookup, SemanticContextValidatingNameConflictsBase } from './SemanticContextValidatingNameConflicts.js';
|
|
12
10
|
import { SemanticContextWithParent } from './SemanticContextWithParent.js';
|
|
13
11
|
import { SourceFileSemanticContext } from './SourceFileSemanticContext.js';
|
|
@@ -25,14 +23,15 @@ export declare class OutermostSemanticContextOfType extends SemanticContextWithP
|
|
|
25
23
|
private readonly node;
|
|
26
24
|
private readonly typeMemberLookupContext;
|
|
27
25
|
constructor(analyzer: Analyzer, node: TypeDeclarationCreatingSemanticContext, outer: SemanticContext);
|
|
28
|
-
getContainingTypeOrTypeExtension(): TypeOrTypeExtension
|
|
26
|
+
getContainingTypeOrTypeExtension(): TypeOrTypeExtension;
|
|
27
|
+
getObjectVariableInfo(): ObjectVariableInfo | undefined;
|
|
29
28
|
getContainingSubprogram(): SubprogramInfo | undefined;
|
|
30
29
|
isStatic(): boolean;
|
|
31
30
|
getTypeMemberLookupContext(): TypeMemberLookupContext;
|
|
32
31
|
getOwnTypesOrContainersWithTypes(_initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
|
|
33
32
|
getOwnTypesOrContainersWithTypesByName(_name: Name, _initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
|
|
34
|
-
getOwnNamedDeclarations(_initialContext: SemanticContext, _noInstanceMembers: boolean): readonly NamedDeclaration[];
|
|
35
|
-
getOwnNamedDeclarationsByName(_name: Name, _initialContext: SemanticContext, _noInstanceMembers: boolean):
|
|
33
|
+
getOwnNamedDeclarations(_initialContext: SemanticContext, _noInstanceMembers: boolean, _lookupState: SemanticContextLookupState): readonly NamedDeclaration[];
|
|
34
|
+
getOwnNamedDeclarationsByName(_name: Name, _initialContext: SemanticContext, _noInstanceMembers: boolean, _lookupResult: SemanticContextLookupState): void;
|
|
36
35
|
private getContainingType;
|
|
37
36
|
}
|
|
38
37
|
type TypeDeclarationWithTypeParameters = TypeDeclaration & tree.TypeParameterClauseParent;
|
|
@@ -50,10 +49,8 @@ declare abstract class TypeOrExtensionBodySemanticContext extends SemanticContex
|
|
|
50
49
|
protected abstract memberLookup: TypeMemberLookup;
|
|
51
50
|
getOwnTypesOrContainersWithTypes(_initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
|
|
52
51
|
getOwnTypesOrContainersWithTypesByName(_name: Name, _initialContext: SemanticContext): readonly TypeOrContainerWithTypes[];
|
|
53
|
-
getOwnNamedDeclarations(initialContext: SemanticContext, noInstanceMembers: boolean): NamedDeclaration[];
|
|
54
|
-
getOwnNamedDeclarationsByName(name: Name, initialContext: SemanticContext, noInstanceMembers: boolean):
|
|
55
|
-
getOwnOperators(initialContext: SemanticContext, noInstanceMembers?: boolean): readonly types.Operator[];
|
|
56
|
-
getOwnOperatorsByKind(kind: OperatorKind, initialContext: SemanticContext, noInstanceMembers?: boolean): readonly types.Operator[];
|
|
52
|
+
getOwnNamedDeclarations(initialContext: SemanticContext, noInstanceMembers: boolean, lookupState: SemanticContextLookupState): readonly NamedDeclaration[];
|
|
53
|
+
getOwnNamedDeclarationsByName(name: Name, initialContext: SemanticContext, noInstanceMembers: boolean, lookupResult: NamedDeclarationLookupResult): void;
|
|
57
54
|
private convertNamedMember;
|
|
58
55
|
}
|
|
59
56
|
export type SemanticContextContainingTypeMember = TypeBodySemanticContext | TypeExtensionBodySemanticContext;
|
|
@@ -80,7 +77,8 @@ export declare class TypeExtensionBodySemanticContext extends TypeOrExtensionBod
|
|
|
80
77
|
private readonly typeMemberLookupContext;
|
|
81
78
|
protected get memberLookup(): TypeMemberLookup;
|
|
82
79
|
constructor(analyzer: Analyzer, node: tree.TypeExtensionDeclaration, outer: SourceFileSemanticContext);
|
|
83
|
-
getContainingTypeOrTypeExtension(): TypeOrTypeExtension
|
|
80
|
+
getContainingTypeOrTypeExtension(): TypeOrTypeExtension;
|
|
81
|
+
getObjectVariableInfo(): ObjectVariableInfo | undefined;
|
|
84
82
|
getTypeMemberLookupContext(): TypeMemberLookupContext;
|
|
85
83
|
}
|
|
86
84
|
export type ParameterOfFunctionTypeSemanticContextParent = TypeParametersOfTypeSemanticContext | OutermostSemanticContextOfType;
|
|
@@ -28,6 +28,7 @@ export declare const enum NameFlags {
|
|
|
28
28
|
PreferKebabCase = 32
|
|
29
29
|
}
|
|
30
30
|
export declare class Name implements Displayable {
|
|
31
|
+
static readonly objectParameterNameKey = "-object";
|
|
31
32
|
/**
|
|
32
33
|
* Исходное имя без одиночных кавычек и без символов '\`' в конце.
|
|
33
34
|
*/
|
|
@@ -60,13 +61,13 @@ export declare class Name implements Displayable {
|
|
|
60
61
|
* @param unescapedOriginalWithoutQuotes Исходное имя без апострофов, одиночных кавычек и экранирования.
|
|
61
62
|
* @param flags Флаги имени (`NameFlags`). `NameFlags.None` по умолчанию.
|
|
62
63
|
*/
|
|
63
|
-
constructor(unescapedOriginalWithoutQuotes: string, flags?: NameFlags);
|
|
64
|
+
constructor(unescapedOriginalWithoutQuotes: string, flags?: NameFlags, specialKey?: string);
|
|
64
65
|
toConflictResolvingParameterName(): Name;
|
|
65
66
|
toBackingVariableName(): Name;
|
|
66
67
|
considerEqual(other: Name, considerBackQuotes?: boolean): boolean;
|
|
67
68
|
toString(): string;
|
|
68
69
|
getPreferredUnescapedOriginal(flags: NameFlags): string;
|
|
69
70
|
getDisplayText(): string;
|
|
70
|
-
static parse(original: string, initialFlags?: NameFlags): Name;
|
|
71
|
+
static parse(original: string, initialFlags?: NameFlags, specialKey?: string): Name;
|
|
71
72
|
private static toUnescapedOriginal;
|
|
72
73
|
}
|