@artel/artc 0.6.25226 → 0.6.25228
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 +12 -56
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +204 -109
- package/build/{chunk-VRQPLLYS.js → chunk-5GSDYTF6.js} +6405 -5358
- package/build/{chunk-YNR2KYMJ.js → chunk-F5OW64UA.js} +3 -3
- package/build/{chunk-MHPX52MT.js → chunk-FHJJX7JY.js} +3 -3
- package/build/types/analysis/Analyzer.d.ts +32 -71
- package/build/types/analysis/AssignmentChecker.d.ts +11 -0
- package/build/types/analysis/CallExpressionMeaning.d.ts +2 -0
- package/build/types/analysis/DeclarationsUsageCounter.d.ts +8 -3
- package/build/types/analysis/DiagnosticCollector.d.ts +15 -5
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +6 -6
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +3 -3
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +9 -9
- package/build/types/analysis/NamedTypeResolver.d.ts +3 -2
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +3 -2
- package/build/types/analysis/NodeTypeUtils.d.ts +3 -2
- package/build/types/analysis/PackageMemberNameConflictsValidator.d.ts +24 -0
- package/build/types/analysis/SourceFileMembers.d.ts +6 -1
- package/build/types/analysis/SourcePackageMembersCreator.d.ts +2 -1
- package/build/types/analysis/TagMeaning.d.ts +3 -2
- package/build/types/analysis/TypeInferrer.d.ts +2 -0
- package/build/types/analysis/TypeMemberLookup.d.ts +11 -11
- package/build/types/analysis/TypeNarrower.d.ts +0 -69
- package/build/types/analysis/control-flow/GraphBuilder.d.ts +6 -2
- package/build/types/analysis/control-flow/NarrowableReference.d.ts +73 -0
- package/build/types/analysis/control-flow/Nodes.d.ts +9 -0
- package/build/types/analysis/control-flow/index.d.ts +1 -0
- package/build/types/analysis/semantic-context/Declarations.d.ts +117 -0
- package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +22 -0
- package/build/types/analysis/semantic-context/SemanticContext.d.ts +13 -0
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +168 -0
- package/build/types/analysis/semantic-context/SemanticContextBasedEntityHidingMatcher.d.ts +14 -0
- package/build/types/analysis/semantic-context/SemanticContextBuilder.d.ts +84 -0
- package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +45 -0
- package/build/types/analysis/semantic-context/SemanticContextWithParent.d.ts +9 -0
- package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +42 -0
- package/build/types/analysis/semantic-context/SpecialLocalDeclarationsBuilder.d.ts +23 -0
- package/build/types/analysis/semantic-context/SubprogramBodyAndParametersSemanticContext.d.ts +89 -0
- package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +114 -0
- package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +94 -0
- package/build/types/analysis/semantic-context/index.d.ts +10 -0
- package/build/types/api/Api.d.ts +3 -5
- package/build/types/common/Cached.d.ts +1 -0
- package/build/types/common/Errors.d.ts +2 -0
- package/build/types/common/Lazy.d.ts +4 -0
- package/build/types/common/Query.d.ts +2 -1
- package/build/types/common/WithDiagnostics.d.ts +4 -3
- package/build/types/common/index.d.ts +1 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +89 -68
- package/build/types/emitter/IrBuilder.d.ts +1 -1
- package/build/types/emitter/Transformer.d.ts +1 -1
- package/build/types/entities/FunctionEntity.d.ts +2 -2
- package/build/types/entities/VariableEntity.d.ts +48 -19
- package/build/types/entities/index.d.ts +4 -0
- package/build/types/services/DefinitionService.d.ts +3 -0
- package/build/types/tree/KeywordKind.d.ts +31 -30
- package/build/types/tree/NodeKind.d.ts +1 -1
- package/build/types/tree/green/Nodes.d.ts +33 -29
- package/build/types/tree/red/Nodes.d.ts +25 -24
- package/build/types/types/TypeFactory.d.ts +0 -2
- package/package.json +1 -1
- package/build/types/analysis/Lookup.d.ts +0 -28
- package/build/types/analysis/Scope.d.ts +0 -205
- package/build/types/analysis/SemanticContext.d.ts +0 -367
- package/build/types/analysis/SemanticContextBuilder.d.ts +0 -59
- package/build/types/analysis/StatementBlockScopeBuilder.d.ts +0 -26
@@ -1,367 +0,0 @@
|
|
1
|
-
import { IEntityHidingMatcher } from '../entities/EntityHiding.js';
|
2
|
-
import { ConstructorEntity, PackageEntity, TypeEntity, TypeEntityWithMembers, TypeExtensionEntity } from '../entities/index.js';
|
3
|
-
import { SourceFile } from '../project/SourceFile.js';
|
4
|
-
import * as tree from '../tree/index.js';
|
5
|
-
import * as types from '../types/index.js';
|
6
|
-
import { Analyzer } from './Analyzer.js';
|
7
|
-
import { LocalizationContext } from './LocalizationContext.js';
|
8
|
-
import { Lookup, ScopeChain } from './Lookup.js';
|
9
|
-
import { FunctionDeclaration, FunctionTypeDeclaration, GetterDeclaration, SetterDeclaration, StructuredTypeDeclaration, VariantTypeDeclaration } from './NodeTypeUtils.js';
|
10
|
-
/**
|
11
|
-
* Позволяет получить информацию, общую для определённой области
|
12
|
-
* исходного кода (блока инструкций, списка членов типа и др.) с учётом
|
13
|
-
* всех вышестоящих (родительских) контекстов.
|
14
|
-
* Чтобы получить семантический контекст, в котором находится определённый узел,
|
15
|
-
* используйте `analyzer.semanticContext.containing(node)`.
|
16
|
-
*/
|
17
|
-
export interface SemanticContext {
|
18
|
-
getScopeChain(): ScopeChain;
|
19
|
-
getContainingSubprogram(): SubprogramInfo | undefined;
|
20
|
-
getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
|
21
|
-
getContainingSourceFile(): SourceFile;
|
22
|
-
getContainingPackage(): PackageEntity;
|
23
|
-
getLocalizationContext(): LocalizationContext;
|
24
|
-
isInTryStatement(): TryStatementClausesInfo | undefined;
|
25
|
-
isInFinallyClause(): boolean;
|
26
|
-
getScopeLookup(): Lookup;
|
27
|
-
getHidingMatcher(): IEntityHidingMatcher;
|
28
|
-
isStatic(): boolean;
|
29
|
-
}
|
30
|
-
export type SubprogramInfo = SubprogramInfo.Function | SubprogramInfo.Operator | SubprogramInfo.Constructor | SubprogramInfo.Destructor | SubprogramInfo.Getter | SubprogramInfo.Setter | SubprogramInfo.PackageConstructor | SubprogramInfo.PackageEntryPoint | SubprogramInfo.FunctionLiteral;
|
31
|
-
export declare namespace SubprogramInfo {
|
32
|
-
export class Function implements ISubprogramInfo {
|
33
|
-
readonly kind = "function";
|
34
|
-
private readonly _analyzer;
|
35
|
-
private readonly _node;
|
36
|
-
constructor(analyzer: Analyzer, node: FunctionDeclaration);
|
37
|
-
getReturnType(): types.Type | undefined;
|
38
|
-
isGenerator(): boolean;
|
39
|
-
allowsAsyncCalls(): boolean;
|
40
|
-
private getEntity;
|
41
|
-
}
|
42
|
-
export class Operator implements ISubprogramInfo {
|
43
|
-
readonly kind = "operator";
|
44
|
-
private readonly _analyzer;
|
45
|
-
private readonly _node;
|
46
|
-
constructor(analyzer: Analyzer, node: tree.OperatorDeclaration);
|
47
|
-
getReturnType(): types.Type | undefined;
|
48
|
-
isGenerator(): boolean;
|
49
|
-
allowsAsyncCalls(): boolean;
|
50
|
-
}
|
51
|
-
export class Constructor implements ISubprogramInfo {
|
52
|
-
readonly kind = "constructor";
|
53
|
-
private readonly _analyzer;
|
54
|
-
private readonly _node;
|
55
|
-
constructor(analyzer: Analyzer, node: tree.ConstructorDeclaration);
|
56
|
-
getReturnType(): types.Type | undefined;
|
57
|
-
isGenerator(): boolean;
|
58
|
-
allowsAsyncCalls(): boolean;
|
59
|
-
getEntity(): ConstructorEntity;
|
60
|
-
}
|
61
|
-
export class Destructor implements ISubprogramInfo {
|
62
|
-
readonly kind = "destructor";
|
63
|
-
private readonly _analyzer;
|
64
|
-
private readonly _node;
|
65
|
-
constructor(analyzer: Analyzer, node: tree.DestructorDeclaration);
|
66
|
-
getReturnType(): types.Type | undefined;
|
67
|
-
isGenerator(): boolean;
|
68
|
-
allowsAsyncCalls(): boolean;
|
69
|
-
}
|
70
|
-
export class Getter implements ISubprogramInfo {
|
71
|
-
readonly kind = "getter";
|
72
|
-
private readonly _analyzer;
|
73
|
-
private readonly _node;
|
74
|
-
constructor(analyzer: Analyzer, node: GetterDeclaration);
|
75
|
-
getReturnType(): types.Type | undefined;
|
76
|
-
isGenerator(): boolean;
|
77
|
-
allowsAsyncCalls(): boolean;
|
78
|
-
}
|
79
|
-
export class Setter implements ISubprogramInfo {
|
80
|
-
readonly kind = "setter";
|
81
|
-
private readonly _analyzer;
|
82
|
-
private readonly _node;
|
83
|
-
constructor(analyzer: Analyzer, node: SetterDeclaration);
|
84
|
-
getReturnType(): types.Type | undefined;
|
85
|
-
isGenerator(): boolean;
|
86
|
-
allowsAsyncCalls(): boolean;
|
87
|
-
}
|
88
|
-
export class PackageConstructor implements ISubprogramInfo {
|
89
|
-
readonly kind = "package-constructor";
|
90
|
-
private readonly _analyzer;
|
91
|
-
private readonly _node;
|
92
|
-
constructor(analyzer: Analyzer, node: tree.PackageConstructorDeclaration);
|
93
|
-
getReturnType(): types.Type | undefined;
|
94
|
-
isGenerator(): boolean;
|
95
|
-
allowsAsyncCalls(): boolean;
|
96
|
-
getPackageEntity(): PackageEntity;
|
97
|
-
}
|
98
|
-
export class PackageEntryPoint implements ISubprogramInfo {
|
99
|
-
readonly kind = "package-entry-point";
|
100
|
-
private readonly _analyzer;
|
101
|
-
private readonly _node;
|
102
|
-
constructor(analyzer: Analyzer, node: tree.PackageEntryPointDeclaration);
|
103
|
-
getReturnType(): types.Type | undefined;
|
104
|
-
isGenerator(): boolean;
|
105
|
-
allowsAsyncCalls(): boolean;
|
106
|
-
getPackageEntity(): PackageEntity;
|
107
|
-
}
|
108
|
-
export class FunctionLiteral implements ISubprogramInfo {
|
109
|
-
readonly kind = "function-literal";
|
110
|
-
private readonly _analyzer;
|
111
|
-
private readonly _node;
|
112
|
-
constructor(analyzer: Analyzer, node: RegularOrBlockFunctionLiteral);
|
113
|
-
getReturnType(): types.Type | undefined;
|
114
|
-
isGenerator(): boolean;
|
115
|
-
allowsAsyncCalls(): boolean;
|
116
|
-
private getSignatureType;
|
117
|
-
}
|
118
|
-
interface ISubprogramInfo {
|
119
|
-
getReturnType(): types.Type | undefined;
|
120
|
-
isGenerator(): boolean;
|
121
|
-
allowsAsyncCalls(): boolean;
|
122
|
-
}
|
123
|
-
export {};
|
124
|
-
}
|
125
|
-
export type TypeOrTypeExtension = TypeOrTypeExtension.Type | TypeOrTypeExtension.TypeExtension;
|
126
|
-
export declare namespace TypeOrTypeExtension {
|
127
|
-
export class Type implements ITypeOrTypeExtension {
|
128
|
-
readonly value: TypeEntityWithMembers;
|
129
|
-
readonly kind = "type";
|
130
|
-
constructor(value: TypeEntityWithMembers);
|
131
|
-
getContextualTypeEntity(): TypeEntity | undefined;
|
132
|
-
getEntity(): TypeEntityWithMembers;
|
133
|
-
}
|
134
|
-
export class TypeExtension implements ITypeOrTypeExtension {
|
135
|
-
readonly value: TypeExtensionEntity;
|
136
|
-
readonly kind = "type-extension";
|
137
|
-
constructor(value: TypeExtensionEntity);
|
138
|
-
getContextualTypeEntity(): TypeEntity | undefined;
|
139
|
-
getEntity(): TypeExtensionEntity;
|
140
|
-
}
|
141
|
-
interface ITypeOrTypeExtension {
|
142
|
-
getContextualTypeEntity(): TypeEntity | undefined;
|
143
|
-
getEntity(): TypeEntityWithMembers | TypeExtensionEntity;
|
144
|
-
}
|
145
|
-
export {};
|
146
|
-
}
|
147
|
-
export declare class TryStatementClausesInfo {
|
148
|
-
readonly hasCatchClause: boolean;
|
149
|
-
readonly hasFinallyClause: boolean;
|
150
|
-
constructor(hasCatchClause: boolean, hasFinallyClause: boolean);
|
151
|
-
}
|
152
|
-
declare abstract class SemanticContextWithParent implements SemanticContext {
|
153
|
-
protected readonly _parentContext: SemanticContext;
|
154
|
-
constructor(parentContext: SemanticContext);
|
155
|
-
getScopeChain(): ScopeChain;
|
156
|
-
getContainingSubprogram(): SubprogramInfo | undefined;
|
157
|
-
getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
|
158
|
-
getContainingSourceFile(): SourceFile;
|
159
|
-
getContainingPackage(): PackageEntity;
|
160
|
-
getLocalizationContext(): LocalizationContext;
|
161
|
-
isInTryStatement(): TryStatementClausesInfo | undefined;
|
162
|
-
isInFinallyClause(): boolean;
|
163
|
-
getScopeLookup(): Lookup;
|
164
|
-
getHidingMatcher(): IEntityHidingMatcher;
|
165
|
-
isStatic(): boolean;
|
166
|
-
}
|
167
|
-
export declare class SourceFileSemanticContext implements SemanticContext {
|
168
|
-
private readonly _analyzer;
|
169
|
-
private readonly _sourceFile;
|
170
|
-
private readonly _scopeChain;
|
171
|
-
constructor(analyzer: Analyzer, node: tree.SourceFile);
|
172
|
-
getScopeChain(): ScopeChain;
|
173
|
-
getHidingMatcher(): IEntityHidingMatcher;
|
174
|
-
getContainingSubprogram(): SubprogramInfo | undefined;
|
175
|
-
getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
|
176
|
-
getContainingSourceFile(): SourceFile;
|
177
|
-
getContainingPackage(): PackageEntity;
|
178
|
-
isInTryStatement(): TryStatementClausesInfo | undefined;
|
179
|
-
isInFinallyClause(): boolean;
|
180
|
-
getScopeLookup(): Lookup;
|
181
|
-
getLocalizationContext(): LocalizationContext;
|
182
|
-
isStatic(): boolean;
|
183
|
-
}
|
184
|
-
export type TypeDeclarationCreatingSemanticContext = StructuredTypeDeclaration | VariantTypeDeclaration | FunctionTypeDeclaration | tree.PackageAliasTypeDeclaration;
|
185
|
-
/**
|
186
|
-
* Завершающий семантический контекст типа.
|
187
|
-
* Поскольку контекст с параметрами типа является опциональным, необходим
|
188
|
-
* ещё один контекст, который гарантированно переопределит метод `getContainingTypeOrTypeExtension`.
|
189
|
-
*/
|
190
|
-
export declare class LastSemanticContextOfType extends SemanticContextWithParent {
|
191
|
-
private readonly _analyzer;
|
192
|
-
private readonly _node;
|
193
|
-
constructor(analyzer: Analyzer, node: TypeDeclarationCreatingSemanticContext, parentContext: SemanticContext);
|
194
|
-
getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
|
195
|
-
getContainingSubprogram(): SubprogramInfo | undefined;
|
196
|
-
isInTryStatement(): TryStatementClausesInfo | undefined;
|
197
|
-
isInFinallyClause(): boolean;
|
198
|
-
isStatic(): boolean;
|
199
|
-
private getContainingType;
|
200
|
-
}
|
201
|
-
type TypeDeclarationWithTypeParameters = tree.PackageStructuredTypeDeclaration | tree.PackageVariantTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.PackageFunctionTypeDeclaration;
|
202
|
-
export declare class TypeParametersOfTypeSemanticContext extends SemanticContextWithParent {
|
203
|
-
private readonly _analyzer;
|
204
|
-
private readonly _node;
|
205
|
-
private readonly _scopeChain;
|
206
|
-
constructor(analyzer: Analyzer, node: TypeDeclarationWithTypeParameters, parentContext: SemanticContext);
|
207
|
-
getScopeChain(): ScopeChain;
|
208
|
-
}
|
209
|
-
export type TypeDeclarationBody = tree.StructuredTypeDeclarationBody | tree.VariantTypeDeclarationBody | tree.AliasTypeDeclarationBody | tree.FunctionTypeDeclarationBody;
|
210
|
-
export declare class TypeBodySemanticContext extends SemanticContextWithParent {
|
211
|
-
private readonly _analyzer;
|
212
|
-
private readonly _node;
|
213
|
-
private readonly _scopeChain;
|
214
|
-
constructor(analyzer: Analyzer, node: TypeDeclarationBody, parentContext: SemanticContext);
|
215
|
-
getScopeChain(): ScopeChain;
|
216
|
-
}
|
217
|
-
export declare class TypeExtensionBodySemanticContext extends SemanticContextWithParent {
|
218
|
-
private readonly _analyzer;
|
219
|
-
private readonly _node;
|
220
|
-
private readonly _scopeChain;
|
221
|
-
constructor(analyzer: Analyzer, node: tree.TypeExtensionDeclaration, parentContext: SemanticContext);
|
222
|
-
getScopeChain(): ScopeChain;
|
223
|
-
getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
|
224
|
-
}
|
225
|
-
/**
|
226
|
-
* Завершающий семантический контекст функции.
|
227
|
-
* Поскольку контекст с параметрами типа функции является опциональным, необходим
|
228
|
-
* ещё один контекст, который гарантированно переопределит метод `getContainingSubprogram`.
|
229
|
-
*/
|
230
|
-
export declare class LastSemanticContextOfFunction extends SemanticContextWithParent {
|
231
|
-
private readonly _analyzer;
|
232
|
-
private readonly _node;
|
233
|
-
private readonly _subprogramInfo;
|
234
|
-
constructor(analyzer: Analyzer, node: FunctionDeclaration, parentContext: SemanticContext);
|
235
|
-
getContainingSubprogram(): SubprogramInfo | undefined;
|
236
|
-
isInTryStatement(): TryStatementClausesInfo | undefined;
|
237
|
-
isInFinallyClause(): boolean;
|
238
|
-
isStatic(): boolean;
|
239
|
-
}
|
240
|
-
export declare class FunctionTypeParameterSemanticContext extends SemanticContextWithParent {
|
241
|
-
private readonly _analyzer;
|
242
|
-
private readonly _node;
|
243
|
-
private readonly _scopeChain;
|
244
|
-
constructor(analyzer: Analyzer, node: FunctionDeclaration, parentContext: SemanticContext);
|
245
|
-
getScopeChain(): ScopeChain;
|
246
|
-
}
|
247
|
-
export declare class FunctionValueParameterSemanticContext extends SemanticContextWithParent {
|
248
|
-
private readonly _analyzer;
|
249
|
-
private readonly _node;
|
250
|
-
private readonly _scopeChain;
|
251
|
-
constructor(analyzer: Analyzer, node: FunctionDeclaration, parentContext: SemanticContext);
|
252
|
-
getScopeChain(): ScopeChain;
|
253
|
-
}
|
254
|
-
export declare class PackageConstructorSemanticContext extends SemanticContextWithParent {
|
255
|
-
private readonly _analyzer;
|
256
|
-
private readonly _node;
|
257
|
-
private readonly _subprogramInfo;
|
258
|
-
constructor(analyzer: Analyzer, node: tree.PackageConstructorDeclaration, parentContext: SemanticContext);
|
259
|
-
getContainingSubprogram(): SubprogramInfo | undefined;
|
260
|
-
}
|
261
|
-
export declare class PackageEntryPointSemanticContext extends SemanticContextWithParent {
|
262
|
-
private readonly _analyzer;
|
263
|
-
private readonly _node;
|
264
|
-
private readonly _subprogramInfo;
|
265
|
-
constructor(analyzer: Analyzer, node: tree.PackageEntryPointDeclaration, parentContext: SemanticContext);
|
266
|
-
getContainingSubprogram(): SubprogramInfo | undefined;
|
267
|
-
}
|
268
|
-
export declare class OperatorSemanticContext extends SemanticContextWithParent {
|
269
|
-
private readonly _analyzer;
|
270
|
-
private readonly _node;
|
271
|
-
private readonly _scopeChain;
|
272
|
-
private readonly _subprogramInfo;
|
273
|
-
constructor(analyzer: Analyzer, node: tree.OperatorDeclaration, parentContext: SemanticContext);
|
274
|
-
getScopeChain(): ScopeChain;
|
275
|
-
getContainingSubprogram(): SubprogramInfo | undefined;
|
276
|
-
isStatic(): boolean;
|
277
|
-
}
|
278
|
-
export declare class ConstructorSemanticContext extends SemanticContextWithParent {
|
279
|
-
private readonly _analyzer;
|
280
|
-
private readonly _node;
|
281
|
-
private readonly _scopeChain;
|
282
|
-
private readonly _subprogramInfo;
|
283
|
-
constructor(analyzer: Analyzer, node: tree.ConstructorDeclaration, parentContext: SemanticContext);
|
284
|
-
getScopeChain(): ScopeChain;
|
285
|
-
getContainingSubprogram(): SubprogramInfo | undefined;
|
286
|
-
}
|
287
|
-
export declare class DestructorSemanticContext extends SemanticContextWithParent {
|
288
|
-
private readonly _analyzer;
|
289
|
-
private readonly _node;
|
290
|
-
private readonly _scopeChain;
|
291
|
-
private readonly _subprogramInfo;
|
292
|
-
constructor(analyzer: Analyzer, node: tree.DestructorDeclaration, parentContext: SemanticContext);
|
293
|
-
getScopeChain(): ScopeChain;
|
294
|
-
getContainingSubprogram(): SubprogramInfo | undefined;
|
295
|
-
}
|
296
|
-
export declare class IndexerSemanticContext extends SemanticContextWithParent {
|
297
|
-
private readonly _analyzer;
|
298
|
-
private readonly _node;
|
299
|
-
private readonly _scopeChain;
|
300
|
-
private readonly _subprogramInfo;
|
301
|
-
constructor(analyzer: Analyzer, node: tree.IndexedElementGetterDeclaration | tree.IndexedElementSetterDeclaration, parentContext: SemanticContext);
|
302
|
-
getScopeChain(): ScopeChain;
|
303
|
-
}
|
304
|
-
export declare class GetterSemanticContext extends SemanticContextWithParent {
|
305
|
-
private readonly _analyzer;
|
306
|
-
private readonly _node;
|
307
|
-
private readonly _subprogramInfo;
|
308
|
-
constructor(analyzer: Analyzer, node: GetterDeclaration, parentContext: SemanticContext);
|
309
|
-
getScopeChain(): ScopeChain;
|
310
|
-
getContainingSubprogram(): SubprogramInfo | undefined;
|
311
|
-
isStatic(): boolean;
|
312
|
-
}
|
313
|
-
export declare class SetterSemanticContext extends SemanticContextWithParent {
|
314
|
-
private readonly _analyzer;
|
315
|
-
private readonly _node;
|
316
|
-
private readonly _subprogramInfo;
|
317
|
-
constructor(analyzer: Analyzer, node: SetterDeclaration, parentContext: SemanticContext);
|
318
|
-
getContainingSubprogram(): SubprogramInfo | undefined;
|
319
|
-
isStatic(): boolean;
|
320
|
-
}
|
321
|
-
export declare class StatementBlockSemanticContext extends SemanticContextWithParent {
|
322
|
-
private readonly _analyzer;
|
323
|
-
private readonly _node;
|
324
|
-
private readonly _scopeChain;
|
325
|
-
constructor(analyzer: Analyzer, node: tree.StatementBlock, parentContext: SemanticContext);
|
326
|
-
getScopeChain(): ScopeChain;
|
327
|
-
isInTryStatement(): TryStatementClausesInfo | undefined;
|
328
|
-
isInFinallyClause(): boolean;
|
329
|
-
}
|
330
|
-
export declare class FunctionBlockSemanticContext extends SemanticContextWithParent {
|
331
|
-
private readonly _analyzer;
|
332
|
-
private readonly _node;
|
333
|
-
private readonly _scopeChain;
|
334
|
-
constructor(analyzer: Analyzer, node: tree.FunctionBlock, parentContext: SemanticContext);
|
335
|
-
getScopeChain(): ScopeChain;
|
336
|
-
}
|
337
|
-
export type RegularOrBlockFunctionLiteral = tree.FunctionLiteral | tree.FunctionBlockLiteral;
|
338
|
-
export declare class FunctionLiteralSemanticContext extends SemanticContextWithParent {
|
339
|
-
private readonly _analyzer;
|
340
|
-
private readonly _node;
|
341
|
-
private readonly _scopeChain;
|
342
|
-
private readonly _subprogramInfo;
|
343
|
-
constructor(analyzer: Analyzer, node: RegularOrBlockFunctionLiteral, parentContext: SemanticContext);
|
344
|
-
getScopeChain(): ScopeChain;
|
345
|
-
getContainingSubprogram(): SubprogramInfo | undefined;
|
346
|
-
}
|
347
|
-
export declare class ForStatementSemanticContext extends SemanticContextWithParent {
|
348
|
-
private readonly _analyzer;
|
349
|
-
private readonly _node;
|
350
|
-
private readonly _scopeChain;
|
351
|
-
constructor(analyzer: Analyzer, node: tree.ForStatement, parentContext: SemanticContext);
|
352
|
-
getScopeChain(): ScopeChain;
|
353
|
-
}
|
354
|
-
export declare class CatchClauseSemanticContext extends SemanticContextWithParent {
|
355
|
-
private readonly _analyzer;
|
356
|
-
private readonly _node;
|
357
|
-
private readonly _scopeChain;
|
358
|
-
constructor(analyzer: Analyzer, node: tree.CatchClause, parentContext: SemanticContext);
|
359
|
-
getScopeChain(): ScopeChain;
|
360
|
-
}
|
361
|
-
export declare class FieldWithInitializerSemanticContext extends SemanticContextWithParent {
|
362
|
-
private readonly _analyzer;
|
363
|
-
private readonly _node;
|
364
|
-
constructor(analyzer: Analyzer, node: tree.FieldDeclaration, parentContext: SemanticContext);
|
365
|
-
isStatic(): boolean;
|
366
|
-
}
|
367
|
-
export {};
|
@@ -1,59 +0,0 @@
|
|
1
|
-
import * as tree from '../tree/index.js';
|
2
|
-
import { Analyzer } from './Analyzer.js';
|
3
|
-
import { FunctionDeclaration } from './NodeTypeUtils.js';
|
4
|
-
import { RegularOrBlockFunctionLiteral, SemanticContext, TypeDeclarationBody, TypeDeclarationCreatingSemanticContext } from './SemanticContext.js';
|
5
|
-
export declare class SemanticContextBuilder {
|
6
|
-
private readonly _analyzer;
|
7
|
-
private readonly _semanticContexts;
|
8
|
-
private readonly _functionDeclarationTypeParametersContexts;
|
9
|
-
private readonly _functionDeclarationValueParametersContexts;
|
10
|
-
private readonly _indexParametersContexts;
|
11
|
-
constructor(analyzer: Analyzer);
|
12
|
-
/**
|
13
|
-
* Возвращает контекст, содержащий узел. Если в качестве узла передан исходный файл,
|
14
|
-
* будет возвращён контекст исходного файла.
|
15
|
-
*/
|
16
|
-
containing(node: tree.Node): SemanticContext;
|
17
|
-
containingWithOffset(node: tree.Node, offset: number): SemanticContext;
|
18
|
-
ofSourceFile(node: tree.SourceFile): SemanticContext;
|
19
|
-
/**
|
20
|
-
* Контекст заголовка функции. Включает параметры-типы и параметры-значения (в зависимости от указанного `hint`).
|
21
|
-
*/
|
22
|
-
ofFunctionDeclarationHeader(node: FunctionDeclaration, hint: 'type-parameters' | 'value-parameters'): SemanticContext;
|
23
|
-
ofOperatorDeclaration(node: tree.OperatorDeclaration): SemanticContext;
|
24
|
-
ofTypeDeclarationBody(node: TypeDeclarationBody): SemanticContext;
|
25
|
-
/**
|
26
|
-
* Контекст заголовка типа. Включает параметры типа.
|
27
|
-
*/
|
28
|
-
ofTypeDeclarationHeader(node: TypeDeclarationCreatingSemanticContext): SemanticContext;
|
29
|
-
ofTypeExtensionDeclarationBody(node: tree.TypeExtensionDeclaration): SemanticContext;
|
30
|
-
ofVariableGetterDeclaration(node: tree.PackageVariableGetterDeclaration | tree.FieldGetterDeclaration | tree.DereferencedVariableGetterDeclaration): SemanticContext;
|
31
|
-
ofVariableSetterDeclaration(node: tree.PackageVariableSetterDeclaration | tree.FieldSetterDeclaration | tree.DereferencedVariableSetterDeclaration): SemanticContext;
|
32
|
-
ofPackageConstructorDeclaration(node: tree.PackageConstructorDeclaration): SemanticContext;
|
33
|
-
ofPackageEntryPointDeclaration(node: tree.PackageEntryPointDeclaration): SemanticContext;
|
34
|
-
ofRegularOrBlockFunctionLiteral(node: RegularOrBlockFunctionLiteral): SemanticContext;
|
35
|
-
ofForStatement(node: tree.ForStatement): SemanticContext;
|
36
|
-
ofStatementBlock(node: tree.StatementBlock): SemanticContext;
|
37
|
-
ofFunctionBlock(node: tree.FunctionBlock): SemanticContext;
|
38
|
-
ofConstructorDeclaration(node: tree.ConstructorDeclaration): SemanticContext;
|
39
|
-
ofDestructorDeclaration(node: tree.DestructorDeclaration): SemanticContext;
|
40
|
-
ofIndexedElementGetterDeclaration(node: tree.IndexedElementGetterDeclaration, hint: 'body' | 'parameters'): SemanticContext;
|
41
|
-
ofIndexedElementSetterDeclaration(node: tree.IndexedElementSetterDeclaration, hint: 'body' | 'parameters'): SemanticContext;
|
42
|
-
ofCatchClause(node: tree.CatchClause): SemanticContext;
|
43
|
-
ofFieldDeclarationWithInitializer(node: tree.FieldDeclaration): SemanticContext;
|
44
|
-
private containingInternal;
|
45
|
-
private ofChildOfFunctionDeclaration;
|
46
|
-
private ofChildOfTypeDeclarationWithMemberBlock;
|
47
|
-
private ofChildOfTypeDeclarationBodyWithMemberBlock;
|
48
|
-
private ofChildOfFunctionTypeDeclarationBody;
|
49
|
-
private ofChildOfFunctionLiteral;
|
50
|
-
private ofOperatorDeclarationChild;
|
51
|
-
private ofConstructorDeclarationChild;
|
52
|
-
private ofDestructorDeclarationChild;
|
53
|
-
private ofIndexedElementGetterDeclarationChild;
|
54
|
-
private ofIndexedElementSetterDeclarationChild;
|
55
|
-
private ofChildOfTypeExtensionDeclaration;
|
56
|
-
private isOffsetBetweenNodes;
|
57
|
-
private isOffsetInsideStatementBlock;
|
58
|
-
private isOffsetInsideFunctionBlock;
|
59
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
import * as tree from '../tree/index.js';
|
2
|
-
import { Analyzer } from './Analyzer.js';
|
3
|
-
import { IScope } from './Scope.js';
|
4
|
-
export declare class StatementBlockScopeBuilder {
|
5
|
-
static buildFunctionBlockScope(analyzer: Analyzer, node: tree.FunctionBlock): IScope;
|
6
|
-
static buildStatementBlockScope(analyzer: Analyzer, node: tree.StatementBlock): IScope;
|
7
|
-
static buildGenericScopeForFunctionBlock(analyzer: Analyzer, node: tree.FunctionBlock): IScope;
|
8
|
-
static buildGenericScopeForStatementBlock(analyzer: Analyzer, node: tree.StatementBlock): IScope;
|
9
|
-
static buildScopeForFunctionBlockLiteral(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.FunctionBlockLiteral): IScope;
|
10
|
-
static buildScopeForPackageFunctionDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.PackageFunctionDeclaration): IScope;
|
11
|
-
static buildScopeForFieldGetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.FieldGetterDeclaration): IScope;
|
12
|
-
static buildScopeForFieldSetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.FieldSetterDeclaration): IScope;
|
13
|
-
static buildScopeForPackageVariableGetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.PackageVariableGetterDeclaration): IScope;
|
14
|
-
static buildScopeForPackageVariableSetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.PackageVariableSetterDeclaration): IScope;
|
15
|
-
static buildScopeForIndexedElementGetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.IndexedElementGetterDeclaration): IScope;
|
16
|
-
static buildScopeForIndexedElementSetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.IndexedElementSetterDeclaration): IScope;
|
17
|
-
static buildScopeForDereferencedVariableGetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.DereferencedVariableGetterDeclaration): IScope;
|
18
|
-
static buildScopeForDereferencedVariableSetterDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.DereferencedVariableSetterDeclaration): IScope;
|
19
|
-
static buildScopeForNestedFunctionDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.NestedFunctionDeclaration): IScope;
|
20
|
-
static buildScopeForFunctionLiteral(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.FunctionLiteral): IScope;
|
21
|
-
static buildScopeForConstructorDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.ConstructorDeclaration): IScope;
|
22
|
-
static buildScopeForMethodDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.MethodDeclaration): IScope;
|
23
|
-
static buildScopeForOperatorDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.OperatorDeclaration): IScope;
|
24
|
-
private static getLocalNamedDeclarationsOfFunctionBlock;
|
25
|
-
private static getLocalNamedDeclarations;
|
26
|
-
}
|