@artel/artc 0.6.25222 → 0.6.25223
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 +8 -2
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +14 -40
- package/build/{chunk-MBMOAUK7.js → chunk-AX3LQ2CF.js} +2 -2
- package/build/{chunk-ODWG5ZXF.js → chunk-DZNNWICP.js} +1258 -659
- package/build/{chunk-UZK7JCND.js → chunk-LG4Z4SWO.js} +1 -1
- package/build/types/analysis/Analyzer.d.ts +6 -6
- package/build/types/analysis/ControlFlowGraphBuilder.d.ts +12 -4
- package/build/types/analysis/LocalizationContext.d.ts +2 -2
- package/build/types/analysis/Lookup.d.ts +4 -4
- package/build/types/analysis/PropertyAccessExpressionMeaning.d.ts +1 -1
- package/build/types/analysis/Scope.d.ts +21 -44
- package/build/types/analysis/SemanticContext.d.ts +14 -1
- package/build/types/analysis/SemanticContextBuilder.d.ts +1 -0
- package/build/types/analysis/StatementBlockScopeBuilder.d.ts +1 -0
- package/build/types/analysis/TypeMemberLookup.d.ts +39 -11
- package/build/types/analysis/TypeNarrower.d.ts +41 -6
- package/build/types/entities/index.d.ts +3 -0
- package/build/types/parser/Scanner.d.ts +1 -2
- package/build/types/tree/green/Nodes.d.ts +4 -5
- package/build/types/tree/red/Nodes.d.ts +3 -3
- package/build/types/types/TypeMembers.d.ts +5 -0
- package/package.json +1 -1
@@ -613,13 +613,13 @@ declare class OwningPlainObjectModificationCheck {
|
|
613
613
|
private nodeBelongsToPlainObjectDeclaration;
|
614
614
|
}
|
615
615
|
export declare enum TypeAssignabilityFlags {
|
616
|
-
NotAssignable =
|
617
|
-
Identity =
|
618
|
-
DerivedToBase =
|
619
|
-
MethodTypes =
|
620
|
-
ImplicitConversion =
|
616
|
+
NotAssignable = 0,
|
617
|
+
Identity = 1,
|
618
|
+
DerivedToBase = 2,
|
619
|
+
MethodTypes = 4,
|
620
|
+
ImplicitConversion = 8,
|
621
621
|
First = 1,
|
622
|
-
Last =
|
622
|
+
Last = 8
|
623
623
|
}
|
624
624
|
declare class PackageImports {
|
625
625
|
private readonly _analyzer;
|
@@ -40,11 +40,11 @@ export declare class ControlFlowGraphBuildResult {
|
|
40
40
|
readonly unreachableCodeDiagnostics: readonly Diagnostic[];
|
41
41
|
constructor(controlFlowNodeByReference: ReadonlyMap<NarrowableReferenceExpression, ControlFlowNode>, unreachableCodeDiagnostics: readonly Diagnostic[]);
|
42
42
|
}
|
43
|
-
export type NarrowableExpression = tree.IdentifierExpression | tree.PropertyAccessExpression | tree.ObjectExpression;
|
44
43
|
export declare function isNarrowableExpression(node: tree.Node): node is tree.Expression;
|
45
44
|
export type NarrowableReferenceExpression = tree.IdentifierExpression | tree.PropertyAccessExpression | tree.ObjectExpression;
|
46
45
|
export declare function isNarrowableReferenceExpression(node: tree.Node): node is NarrowableReferenceExpression;
|
47
|
-
export
|
46
|
+
export declare function unwrapExpressionForNarrowableReferenceCheck(node: tree.Expression): tree.Expression;
|
47
|
+
export type ControlFlowNode = ControlFlowNode.Start | ControlFlowNode.Condition | ControlFlowNode.Assignment | ControlFlowNode.LocalVariableDeclaration | ControlFlowNode.Split | ControlFlowNode.Loop | ControlFlowNode.Unreachable;
|
48
48
|
export declare namespace ControlFlowNode {
|
49
49
|
abstract class ControlFlowNodeBase {
|
50
50
|
protected abstract thisAsNode: ControlFlowNode;
|
@@ -80,11 +80,19 @@ export declare namespace ControlFlowNode {
|
|
80
80
|
*/
|
81
81
|
export class Assignment extends ControlFlowNodeBase {
|
82
82
|
readonly predecessor: ControlFlowNode;
|
83
|
-
readonly syntaxNode: tree.AssignmentStatement
|
83
|
+
readonly syntaxNode: tree.AssignmentStatement;
|
84
84
|
readonly kind = "assignment";
|
85
85
|
get debuggerDisplay(): string;
|
86
86
|
protected get thisAsNode(): ControlFlowNode;
|
87
|
-
constructor(predecessor: ControlFlowNode, syntaxNode: tree.AssignmentStatement
|
87
|
+
constructor(predecessor: ControlFlowNode, syntaxNode: tree.AssignmentStatement);
|
88
|
+
}
|
89
|
+
export class LocalVariableDeclaration extends ControlFlowNodeBase {
|
90
|
+
readonly predecessor: ControlFlowNode;
|
91
|
+
readonly syntaxNode: tree.LocalVariableDeclaration;
|
92
|
+
readonly kind = "local-variable-declaration";
|
93
|
+
get debuggerDisplay(): string;
|
94
|
+
protected get thisAsNode(): ControlFlowNode;
|
95
|
+
constructor(predecessor: ControlFlowNode, syntaxNode: tree.LocalVariableDeclaration);
|
88
96
|
}
|
89
97
|
/**
|
90
98
|
* Вспомогательный узел, использующийся в местах, где происходит разветвление графа потока управления. Тип переменной
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Name, PackageLocale } from '../common/index.js';
|
2
|
-
import { AliasTypeEntity, MethodEntity, PackageAliasEntity, PackageEntity, PackageMethodTypeEntity, PackageStructuredTypeEntity, PackageVariantTypeEntity,
|
2
|
+
import { AliasTypeEntity, MethodEntity, PackageAliasEntity, PackageEntity, PackageMethodTypeEntity, PackageStructuredTypeEntity, PackageVariantTypeEntity, TypeOrExtensionEntity, TypeParameterEntity, VariableEntity } from '../entities/index.js';
|
3
3
|
import { AnalyzedTranslationPackage, TranslatedTypeEntityMembers } from './AnalyzedTranslationPackage.js';
|
4
4
|
export declare class LocalizationContext {
|
5
5
|
readonly originalLocale: PackageLocale;
|
@@ -8,7 +8,7 @@ export declare class LocalizationContext {
|
|
8
8
|
constructor(translationPackages: readonly AnalyzedTranslationPackage[], originalLocale: PackageLocale);
|
9
9
|
getTranslationPackage(packageEntity: PackageEntity): AnalyzedTranslationPackage | undefined;
|
10
10
|
getTranslationLocale(packageEntity: PackageEntity): PackageLocale;
|
11
|
-
|
11
|
+
getTranslatedTypeOrExtensionEntityMembers(entity: TypeOrExtensionEntity): TranslatedTypeEntityMembers | undefined;
|
12
12
|
getEntityName(entity: NamedEntity): Name;
|
13
13
|
}
|
14
14
|
export type NamedEntity = VariableEntity | PackageVariantTypeEntity | MethodEntity | TypeParameterEntity | PackageMethodTypeEntity | PackageStructuredTypeEntity | PackageAliasEntity | AliasTypeEntity;
|
@@ -9,10 +9,10 @@ export declare class Lookup {
|
|
9
9
|
constructor(_scopeChain: ScopeChain, _hidingMatcher: IEntityHidingMatcher);
|
10
10
|
getTypesOrContainersWithTypes(): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
11
11
|
getTypesOrContainersWithTypesByName(name: SearchName): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
12
|
-
getNamedDeclarations(): readonly FoundNamedDeclaration<NamedDeclaration>[];
|
13
|
-
getNamedDeclarationsByName(name: SearchName): readonly FoundNamedDeclaration<NamedDeclaration>[];
|
14
|
-
getOperators(): readonly FoundAnonymousDeclaration<types.Operator>[];
|
15
|
-
getOperatorsByKind(kind: OperatorKind): readonly FoundAnonymousDeclaration<types.Operator>[];
|
12
|
+
getNamedDeclarations(noInstanceMembers?: boolean): readonly FoundNamedDeclaration<NamedDeclaration>[];
|
13
|
+
getNamedDeclarationsByName(name: SearchName, noInstanceMembers?: boolean): readonly FoundNamedDeclaration<NamedDeclaration>[];
|
14
|
+
getOperators(noInstanceMembers?: boolean): readonly FoundAnonymousDeclaration<types.Operator>[];
|
15
|
+
getOperatorsByKind(kind: OperatorKind, noInstanceMembers?: boolean): readonly FoundAnonymousDeclaration<types.Operator>[];
|
16
16
|
getTypeExtensionsByType(type: TypeEntity): readonly TypeExtensionEntity[];
|
17
17
|
private checkTypeOrPackageDeclarationShadowing;
|
18
18
|
private checkNamedDeclarationShadowing;
|
@@ -24,7 +24,7 @@ export declare class Resolver {
|
|
24
24
|
private resolveStaticMemberOrVariantAccessMeaning;
|
25
25
|
private createAccessedMethodFromTypeMember;
|
26
26
|
private resolveInstanceMemberAccessMeaning;
|
27
|
-
private
|
27
|
+
private tryResolveInstanceOperatorAccessMeaning;
|
28
28
|
private resolveMethodOverload;
|
29
29
|
private convertSyntacticAccessKind;
|
30
30
|
}
|
@@ -10,10 +10,10 @@ import { TypeMemberLookup } from './TypeMemberLookup.js';
|
|
10
10
|
export interface IScope {
|
11
11
|
getTypesOrContainersWithTypes(hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
12
12
|
getTypesOrContainersWithTypesByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
13
|
-
getNamedDeclarations(hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedDeclaration>[];
|
14
|
-
getNamedDeclarationsByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedDeclaration>[];
|
15
|
-
getOperators(hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
|
16
|
-
getOperatorsByKind(kind: OperatorKind, hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
|
13
|
+
getNamedDeclarations(noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedDeclaration>[];
|
14
|
+
getNamedDeclarationsByName(name: SearchName, noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedDeclaration>[];
|
15
|
+
getOperators(noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
|
16
|
+
getOperatorsByKind(kind: OperatorKind, noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
|
17
17
|
getTypeExtensionsByType(typeEntity: TypeEntity, hidingMatcher?: IEntityHidingMatcher): readonly TypeExtensionEntity[];
|
18
18
|
}
|
19
19
|
export type TypeOrContainerWithTypes = NamedDeclaration_type | NamedDeclaration_packageAlias | NamedDeclaration_packageNameSegment;
|
@@ -139,10 +139,10 @@ export declare class SourceFileScope implements IScope {
|
|
139
139
|
constructor(analyzer: Analyzer, node: tree.SourceFile);
|
140
140
|
getTypesOrContainersWithTypes(hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
141
141
|
getTypesOrContainersWithTypesByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
142
|
-
getNamedDeclarations(hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
143
|
-
getNamedDeclarationsByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
144
|
-
getOperators(_hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
|
145
|
-
getOperatorsByKind(_kind: OperatorKind, _hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
|
142
|
+
getNamedDeclarations(_noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
143
|
+
getNamedDeclarationsByName(name: SearchName, _noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
144
|
+
getOperators(_noInstanceMembers?: boolean, _hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
|
145
|
+
getOperatorsByKind(_kind: OperatorKind, _noInstanceMembers?: boolean, _hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
|
146
146
|
getTypeExtensionsByType(type: TypeEntity, hidingMatcher?: IEntityHidingMatcher): TypeExtensionEntity[];
|
147
147
|
private convertPackageMemberToNamedDeclaration;
|
148
148
|
private convertPackageAliasToTypeOrContainerWithTypes;
|
@@ -163,10 +163,10 @@ export declare class GenericScope implements IScope {
|
|
163
163
|
constructor(namedDeclarations: readonly NamedDeclaration[], typeExtensionEntities: readonly TypeExtensionEntity[], locale: PackageLocale);
|
164
164
|
getTypesOrContainersWithTypes(hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
165
165
|
getTypesOrContainersWithTypesByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
166
|
-
getNamedDeclarations(hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
167
|
-
getNamedDeclarationsByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
168
|
-
getOperators(_hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
|
169
|
-
getOperatorsByKind(_kind: OperatorKind, _hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
|
166
|
+
getNamedDeclarations(_noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
167
|
+
getNamedDeclarationsByName(name: SearchName, _noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
168
|
+
getOperators(_noInstanceMembers?: boolean, _hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
|
169
|
+
getOperatorsByKind(_kind: OperatorKind, _noInstanceMembers?: boolean, _hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
|
170
170
|
getTypeExtensionsByType(typeEntity: TypeEntity, hidingMatcher?: IEntityHidingMatcher): TypeExtensionEntity[];
|
171
171
|
private checkHiding;
|
172
172
|
}
|
@@ -182,47 +182,24 @@ export declare class ParameterDeclarationsScope implements IScope {
|
|
182
182
|
constructor(analyzer: Analyzer, node: tree.ParameterList);
|
183
183
|
getTypesOrContainersWithTypes(hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
184
184
|
getTypesOrContainersWithTypesByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
185
|
-
getNamedDeclarations(hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
186
|
-
getNamedDeclarationsByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
187
|
-
getOperators(_hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
|
188
|
-
getOperatorsByKind(_kind: OperatorKind, _hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
|
185
|
+
getNamedDeclarations(_noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
186
|
+
getNamedDeclarationsByName(name: SearchName, noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
187
|
+
getOperators(_noInstanceMembers?: boolean, _hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
|
188
|
+
getOperatorsByKind(_kind: OperatorKind, _noInstanceMembers?: boolean, _hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
|
189
189
|
getTypeExtensionsByType(typeEntity: TypeEntity, hidingMatcher?: IEntityHidingMatcher): TypeExtensionEntity[];
|
190
190
|
private checkHiding;
|
191
191
|
}
|
192
|
-
export declare class
|
192
|
+
export declare class TypeWithMembersOrExtensionBodyScope implements IScope {
|
193
193
|
private readonly _memberLookup;
|
194
194
|
private readonly _typeExtensionsLookup;
|
195
195
|
constructor(_memberLookup: TypeMemberLookup, _typeExtensionsLookup: Lookup);
|
196
196
|
getTypesOrContainersWithTypes(_hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
197
197
|
getTypesOrContainersWithTypesByName(_name: SearchName, _hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
198
|
-
getNamedDeclarations(hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
199
|
-
getNamedDeclarationsByName(name: SearchName, hidingMatcher
|
200
|
-
getOperators(hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
|
201
|
-
getOperatorsByKind(kind: OperatorKind, hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
|
198
|
+
getNamedDeclarations(noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
199
|
+
getNamedDeclarationsByName(name: SearchName, noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
200
|
+
getOperators(noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
|
201
|
+
getOperatorsByKind(kind: OperatorKind, noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
|
202
202
|
getTypeExtensionsByType(_typeEntity: TypeEntity, _hidingMatcher?: IEntityHidingMatcher): TypeExtensionEntity[];
|
203
203
|
private convertNamedMember;
|
204
204
|
}
|
205
|
-
export declare class TypeExtensionBodyScope implements IScope {
|
206
|
-
private readonly _analyzer;
|
207
|
-
private readonly _extendedTypeMemberLookup;
|
208
|
-
private readonly _extendedType;
|
209
|
-
private readonly _typeExtensionEntity;
|
210
|
-
private readonly _typeExtensionsLookup;
|
211
|
-
private readonly _locale;
|
212
|
-
private readonly _substitutions;
|
213
|
-
private get substitutions();
|
214
|
-
constructor(_analyzer: Analyzer, _extendedTypeMemberLookup: TypeMemberLookup | undefined, _extendedType: NamedTypeEntity | undefined, _typeExtensionEntity: TypeExtensionEntity, _typeExtensionsLookup: Lookup, _locale: PackageLocale);
|
215
|
-
getTypesOrContainersWithTypes(_hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
216
|
-
getTypesOrContainersWithTypesByName(_name: SearchName, _hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<TypeOrContainerWithTypes>[];
|
217
|
-
getNamedDeclarations(hidingMatcher: IEntityHidingMatcher | undefined): FoundNamedDeclaration<NamedDeclaration>[];
|
218
|
-
getNamedDeclarationsByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
|
219
|
-
getOperators(hidingMatcher?: IEntityHidingMatcher): FoundAnonymousDeclaration<types.Operator>[];
|
220
|
-
getOperatorsByKind(kind: OperatorKind, hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
|
221
|
-
getTypeExtensionsByType(_typeEntity: TypeEntity, _hidingMatcher?: IEntityHidingMatcher): TypeExtensionEntity[];
|
222
|
-
private convertNamedTypeExtensionMember;
|
223
|
-
private convertTypeExtensionOperator;
|
224
|
-
private convertExtendedTypeMember;
|
225
|
-
private checkOperatorShadowing;
|
226
|
-
private checkNamedDeclarationShadowing;
|
227
|
-
}
|
228
205
|
export {};
|
@@ -25,6 +25,7 @@ export interface SemanticContext {
|
|
25
25
|
isInFinallyClause(): boolean;
|
26
26
|
getScopeLookup(): Lookup;
|
27
27
|
getHidingMatcher(): IEntityHidingMatcher;
|
28
|
+
isStatic(): boolean;
|
28
29
|
}
|
29
30
|
export type SubprogramInfo = SubprogramInfo.Method | SubprogramInfo.Operator | SubprogramInfo.Constructor | SubprogramInfo.Destructor | SubprogramInfo.Getter | SubprogramInfo.Setter | SubprogramInfo.PackageConstructor | SubprogramInfo.PackageEntryPoint | SubprogramInfo.MethodLiteral;
|
30
31
|
export declare namespace SubprogramInfo {
|
@@ -161,6 +162,7 @@ declare abstract class SemanticContextWithParent implements SemanticContext {
|
|
161
162
|
isInFinallyClause(): boolean;
|
162
163
|
getScopeLookup(): Lookup;
|
163
164
|
getHidingMatcher(): IEntityHidingMatcher;
|
165
|
+
isStatic(): boolean;
|
164
166
|
}
|
165
167
|
export declare class SourceFileSemanticContext implements SemanticContext {
|
166
168
|
private readonly _analyzer;
|
@@ -177,6 +179,7 @@ export declare class SourceFileSemanticContext implements SemanticContext {
|
|
177
179
|
isInFinallyClause(): boolean;
|
178
180
|
getScopeLookup(): Lookup;
|
179
181
|
getLocalizationContext(): LocalizationContext;
|
182
|
+
isStatic(): boolean;
|
180
183
|
}
|
181
184
|
export type TypeDeclarationCreatingSemanticContext = StructuredTypeDeclaration | VariantTypeDeclaration | MethodTypeDeclaration | tree.PackageAliasTypeDeclaration;
|
182
185
|
/**
|
@@ -192,6 +195,7 @@ export declare class LastSemanticContextOfType extends SemanticContextWithParent
|
|
192
195
|
getContainingSubprogram(): SubprogramInfo | undefined;
|
193
196
|
isInTryStatement(): TryStatementClausesInfo | undefined;
|
194
197
|
isInFinallyClause(): boolean;
|
198
|
+
isStatic(): boolean;
|
195
199
|
private getContainingType;
|
196
200
|
}
|
197
201
|
type TypeDeclarationWithTypeParameters = tree.PackageStructuredTypeDeclaration | tree.PackageVariantTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.PackageMethodTypeDeclaration;
|
@@ -231,6 +235,7 @@ export declare class LastSemanticContextOfMethod extends SemanticContextWithPare
|
|
231
235
|
getContainingSubprogram(): SubprogramInfo | undefined;
|
232
236
|
isInTryStatement(): TryStatementClausesInfo | undefined;
|
233
237
|
isInFinallyClause(): boolean;
|
238
|
+
isStatic(): boolean;
|
234
239
|
}
|
235
240
|
export declare class MethodTypeParameterSemanticContext extends SemanticContextWithParent {
|
236
241
|
private readonly _analyzer;
|
@@ -268,6 +273,7 @@ export declare class OperatorSemanticContext extends SemanticContextWithParent {
|
|
268
273
|
constructor(analyzer: Analyzer, node: tree.OperatorDeclaration, parentContext: SemanticContext);
|
269
274
|
getScopeChain(): ScopeChain;
|
270
275
|
getContainingSubprogram(): SubprogramInfo | undefined;
|
276
|
+
isStatic(): boolean;
|
271
277
|
}
|
272
278
|
export declare class ConstructorSemanticContext extends SemanticContextWithParent {
|
273
279
|
private readonly _analyzer;
|
@@ -298,11 +304,11 @@ export declare class IndexerSemanticContext extends SemanticContextWithParent {
|
|
298
304
|
export declare class GetterSemanticContext extends SemanticContextWithParent {
|
299
305
|
private readonly _analyzer;
|
300
306
|
private readonly _node;
|
301
|
-
private readonly _scopeChain;
|
302
307
|
private readonly _subprogramInfo;
|
303
308
|
constructor(analyzer: Analyzer, node: GetterDeclaration, parentContext: SemanticContext);
|
304
309
|
getScopeChain(): ScopeChain;
|
305
310
|
getContainingSubprogram(): SubprogramInfo | undefined;
|
311
|
+
isStatic(): boolean;
|
306
312
|
}
|
307
313
|
export declare class SetterSemanticContext extends SemanticContextWithParent {
|
308
314
|
private readonly _analyzer;
|
@@ -310,6 +316,7 @@ export declare class SetterSemanticContext extends SemanticContextWithParent {
|
|
310
316
|
private readonly _subprogramInfo;
|
311
317
|
constructor(analyzer: Analyzer, node: SetterDeclaration, parentContext: SemanticContext);
|
312
318
|
getContainingSubprogram(): SubprogramInfo | undefined;
|
319
|
+
isStatic(): boolean;
|
313
320
|
}
|
314
321
|
export declare class StatementBlockSemanticContext extends SemanticContextWithParent {
|
315
322
|
private readonly _analyzer;
|
@@ -351,4 +358,10 @@ export declare class CatchClauseSemanticContext extends SemanticContextWithParen
|
|
351
358
|
constructor(analyzer: Analyzer, node: tree.CatchClause, parentContext: SemanticContext);
|
352
359
|
getScopeChain(): ScopeChain;
|
353
360
|
}
|
361
|
+
export declare class TypeVariableWithInitializerSemanticContext extends SemanticContextWithParent {
|
362
|
+
private readonly _analyzer;
|
363
|
+
private readonly _node;
|
364
|
+
constructor(analyzer: Analyzer, node: tree.TypeVariableDeclaration, parentContext: SemanticContext);
|
365
|
+
isStatic(): boolean;
|
366
|
+
}
|
354
367
|
export {};
|
@@ -40,6 +40,7 @@ export declare class SemanticContextBuilder {
|
|
40
40
|
ofTypeIndexedGetterDeclaration(node: tree.TypeIndexedGetterDeclaration, hint: 'body' | 'parameters'): SemanticContext;
|
41
41
|
ofTypeIndexedSetterDeclaration(node: tree.TypeIndexedSetterDeclaration, hint: 'body' | 'parameters'): SemanticContext;
|
42
42
|
ofCatchClause(node: tree.CatchClause): SemanticContext;
|
43
|
+
ofTypeVariableDeclarationWithInitializer(node: tree.TypeVariableDeclaration): SemanticContext;
|
43
44
|
private containingInternal;
|
44
45
|
private ofChildOfMethodDeclaration;
|
45
46
|
private ofChildOfTypeDeclarationWithMemberBlock;
|
@@ -21,5 +21,6 @@ export declare class StatementBlockScopeBuilder {
|
|
21
21
|
static buildScopeForTypeConstructorDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.TypeConstructorDeclaration): IScope;
|
22
22
|
static buildScopeForTypeMethodDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.TypeMethodDeclaration): IScope;
|
23
23
|
static buildScopeForOperatorDeclaration(analyzer: Analyzer, node: tree.FunctionBlock, parent: tree.OperatorDeclaration): IScope;
|
24
|
+
private static getLocalNamedDeclarationsOfFunctionBlock;
|
24
25
|
private static getLocalNamedDeclarations;
|
25
26
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { PackageLocale, SearchName } from '../common/index.js';
|
2
|
-
import { IEntityHidingMatcher, OperatorKind, TypeEntity } from '../entities/index.js';
|
2
|
+
import { IEntityHidingMatcher, OperatorKind, TypeEntity, TypeExtensionEntity, TypeOrExtensionEntity } from '../entities/index.js';
|
3
3
|
import * as types from '../types/index.js';
|
4
4
|
import { Analyzer } from './Analyzer.js';
|
5
5
|
import { FoundAnonymousDeclaration, FoundNamedDeclaration } from './FoundDeclaration.js';
|
@@ -7,30 +7,36 @@ import { LocalizationContext } from './LocalizationContext.js';
|
|
7
7
|
import { Lookup } from './Lookup.js';
|
8
8
|
export declare class TypeMemberLookup {
|
9
9
|
private readonly _analyzer;
|
10
|
-
private readonly
|
10
|
+
private readonly _typeOrExtension;
|
11
11
|
private readonly _localizationContext;
|
12
12
|
private readonly _searchLocale;
|
13
13
|
/**
|
14
14
|
* Язык, на котором будет осуществляться поиск членов типа.
|
15
15
|
*/
|
16
16
|
get searchLocale(): PackageLocale;
|
17
|
-
constructor(
|
17
|
+
private constructor();
|
18
|
+
static ofType(analyzer: Analyzer, type: types.Type, localizationContext: LocalizationContext | undefined): TypeMemberLookup;
|
18
19
|
static ofTypeEntity(analyzer: Analyzer, entity: TypeEntity, localizationContext: LocalizationContext | undefined): TypeMemberLookup;
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
static ofTypeExtension(analyzer: Analyzer, typeExtension: TypeExtensionEntity, localizationContext: LocalizationContext | undefined): TypeMemberLookup;
|
21
|
+
static ofTypeOrExtension(analyzer: Analyzer, typeOrExtension: TypeOrExtension, localizationContext: LocalizationContext | undefined): TypeMemberLookup;
|
22
|
+
getNamedMembers(options?: TypeMemberLookupOptions, hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundNamedDeclaration<types.NamedTypeMember>[];
|
23
|
+
getNamedMembersByName(name: SearchName, options?: TypeMemberLookupOptions, hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundNamedDeclaration<types.NamedTypeMember>[];
|
24
|
+
getOperators(options?: TypeMemberLookupOptions, hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundAnonymousDeclaration<types.Operator>[];
|
25
|
+
getOperatorsByKind(kind: OperatorKind, options?: TypeMemberLookupOptions, hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundAnonymousDeclaration<types.Operator>[];
|
23
26
|
getConstructors(hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundAnonymousDeclaration<types.Constructor>[];
|
24
|
-
getIndexers(hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundAnonymousDeclaration<types.Indexer>[];
|
25
|
-
getDereferenceOperators(hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundAnonymousDeclaration<types.DereferenceOperator>[];
|
27
|
+
getIndexers(options?: TypeMemberLookupOptions, hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundAnonymousDeclaration<types.Indexer>[];
|
28
|
+
getDereferenceOperators(options?: TypeMemberLookupOptions, hidingMatcher?: IEntityHidingMatcher, typeExtensionsLookup?: Lookup): readonly FoundAnonymousDeclaration<types.DereferenceOperator>[];
|
26
29
|
private getLocaleOfTypeEntity;
|
27
30
|
}
|
28
31
|
export declare class BoundTypeMemberLookup {
|
29
32
|
private readonly _lookup;
|
33
|
+
private readonly _options;
|
30
34
|
private readonly _hidingMatcher;
|
31
35
|
private readonly _typeExtensionLookup;
|
32
|
-
constructor(
|
33
|
-
static
|
36
|
+
private constructor();
|
37
|
+
static ofType(analyzer: Analyzer, type: types.Type, localizationContext: LocalizationContext | undefined, options: TypeMemberLookupOptions | undefined, hidingMatcher: IEntityHidingMatcher | undefined, typeExtensionLookup: Lookup | undefined): BoundTypeMemberLookup;
|
38
|
+
static ofTypeEntity(analyzer: Analyzer, entity: TypeEntity, localizationContext: LocalizationContext | undefined, options: TypeMemberLookupOptions | undefined, hidingMatcher: IEntityHidingMatcher | undefined, typeExtensionLookup: Lookup | undefined): BoundTypeMemberLookup;
|
39
|
+
static ofTypeExtension(analyzer: Analyzer, typeExtension: TypeExtensionEntity, localizationContext: LocalizationContext | undefined, options: TypeMemberLookupOptions | undefined, hidingMatcher: IEntityHidingMatcher | undefined, typeExtensionLookup: Lookup | undefined): BoundTypeMemberLookup;
|
34
40
|
getNamedMembers(): readonly FoundNamedDeclaration<types.NamedTypeMember>[];
|
35
41
|
getNamedMembersByName(name: SearchName): readonly FoundNamedDeclaration<types.NamedTypeMember>[];
|
36
42
|
getOperators(): readonly FoundAnonymousDeclaration<types.Operator>[];
|
@@ -39,3 +45,25 @@ export declare class BoundTypeMemberLookup {
|
|
39
45
|
getIndexers(): readonly FoundAnonymousDeclaration<types.Indexer>[];
|
40
46
|
getDereferenceOperators(): readonly FoundAnonymousDeclaration<types.DereferenceOperator>[];
|
41
47
|
}
|
48
|
+
export declare enum TypeMemberLookupOptions {
|
49
|
+
None = 0,
|
50
|
+
OnlyInstanceMembers = 1,
|
51
|
+
OnlyStaticMembers = 2
|
52
|
+
}
|
53
|
+
type TypeOrExtension = TypeOrExtension_type | TypeOrExtension_extension;
|
54
|
+
declare class TypeOrExtension_type implements ITypeOrExtension {
|
55
|
+
readonly value: types.Type;
|
56
|
+
readonly kind = "type";
|
57
|
+
constructor(value: types.Type);
|
58
|
+
getEntity(): TypeOrExtensionEntity | undefined;
|
59
|
+
}
|
60
|
+
declare class TypeOrExtension_extension implements ITypeOrExtension {
|
61
|
+
readonly value: TypeExtensionEntity;
|
62
|
+
readonly kind = "extension";
|
63
|
+
constructor(value: TypeExtensionEntity);
|
64
|
+
getEntity(): TypeOrExtensionEntity | undefined;
|
65
|
+
}
|
66
|
+
interface ITypeOrExtension {
|
67
|
+
getEntity(): TypeOrExtensionEntity | undefined;
|
68
|
+
}
|
69
|
+
export {};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { LocalVariableEntity, ParameterVariableEntity } from '../entities/VariableEntity.js';
|
1
|
+
import { LocalVariableEntity, PackageVariableEntity, ParameterVariableEntity } from '../entities/VariableEntity.js';
|
2
2
|
import * as types from '../types/index.js';
|
3
3
|
import { Analyzer } from './Analyzer.js';
|
4
4
|
import { ControlFlowNode, NarrowableReferenceExpression } from './ControlFlowGraphBuilder.js';
|
@@ -9,54 +9,89 @@ export declare class TypeNarrower {
|
|
9
9
|
private readonly _controlFlowNode;
|
10
10
|
private _reference;
|
11
11
|
private readonly _typeByNode;
|
12
|
+
private readonly _isVariableAssignedInLoopCheckResults;
|
12
13
|
constructor(analyzer: Analyzer, referenceExpression: NarrowableReferenceExpression, initialType: types.Type, controlFlowNode: ControlFlowNode);
|
13
14
|
getType(): types.Type;
|
14
15
|
private getTypeAtControlFlowNode;
|
15
16
|
private getTypeAtCondition;
|
16
17
|
private getTypeAtAssignment;
|
18
|
+
private getTypeAtLocalVariableDeclaration;
|
17
19
|
private getTypeAtSplit;
|
18
20
|
private getTypeAtLoop;
|
21
|
+
private getTypeAtAssignmentWithImplicitConversion;
|
19
22
|
private getTypeAtComparisonWithNone;
|
20
23
|
private getTypeAtIsExpression;
|
24
|
+
private getTypeAtAssignmentOrDeclaration;
|
21
25
|
private addTypeIfUnique;
|
26
|
+
private checkIfVariableIsAssignedInLoop;
|
27
|
+
private checkIfVariableIsAssignedAtNode;
|
22
28
|
private isSameReferenceAsNarrowedExpression;
|
23
|
-
private unwrapExpression;
|
24
29
|
private getReferenceAtNodeIfNarrowable;
|
25
30
|
private getReferenceAtNode;
|
26
31
|
private getReferenceAtLocalVariableDeclaration;
|
27
32
|
}
|
28
|
-
export type NarrowableReference = NarrowableReference.LocalVariable | NarrowableReference.InstanceTypeVariable | NarrowableReference.StaticTypeVariable | NarrowableReference.Object;
|
33
|
+
export type NarrowableReference = NarrowableReference.LocalVariable | NarrowableReference.PackageVariable | NarrowableReference.InstanceTypeVariable | NarrowableReference.StaticTypeVariable | NarrowableReference.Object;
|
29
34
|
export declare namespace NarrowableReference {
|
30
35
|
export class LocalVariable implements INarrowableReference {
|
36
|
+
private readonly _analyzer;
|
31
37
|
readonly entity: LocalVariableEntity | ParameterVariableEntity;
|
32
38
|
readonly kind = "local-variable";
|
33
|
-
constructor(entity: LocalVariableEntity | ParameterVariableEntity);
|
39
|
+
constructor(_analyzer: Analyzer, entity: LocalVariableEntity | ParameterVariableEntity);
|
34
40
|
equals(other: NarrowableReference): boolean;
|
35
41
|
contains(_other: NarrowableReference): boolean;
|
42
|
+
equalsExpression(expression: NarrowableReferenceExpression): boolean;
|
43
|
+
containsExpression(_expression: NarrowableReferenceExpression): boolean;
|
44
|
+
}
|
45
|
+
export class PackageVariable implements INarrowableReference {
|
46
|
+
private readonly _analyzer;
|
47
|
+
readonly entity: PackageVariableEntity;
|
48
|
+
readonly kind = "package-variable";
|
49
|
+
constructor(_analyzer: Analyzer, entity: PackageVariableEntity);
|
50
|
+
equals(other: NarrowableReference): boolean;
|
51
|
+
contains(_other: NarrowableReference): boolean;
|
52
|
+
equalsExpression(expression: NarrowableReferenceExpression): boolean;
|
53
|
+
containsExpression(_expression: NarrowableReferenceExpression): boolean;
|
36
54
|
}
|
37
55
|
export class InstanceTypeVariable implements INarrowableReference {
|
56
|
+
private readonly _analyzer;
|
38
57
|
readonly variable: types.Variable;
|
39
58
|
readonly receiver: NarrowableReference;
|
40
59
|
readonly kind = "instance-type-variable";
|
41
|
-
constructor(variable: types.Variable, receiver: NarrowableReference);
|
60
|
+
constructor(_analyzer: Analyzer, variable: types.Variable, receiver: NarrowableReference);
|
42
61
|
equals(other: NarrowableReference): boolean;
|
43
62
|
contains(other: NarrowableReference): boolean;
|
63
|
+
equalsExpression(expression: NarrowableReferenceExpression): boolean;
|
64
|
+
containsExpression(expression: NarrowableReferenceExpression): boolean;
|
44
65
|
}
|
45
66
|
export class StaticTypeVariable implements INarrowableReference {
|
67
|
+
private readonly _analyzer;
|
46
68
|
readonly variable: types.Variable;
|
47
69
|
readonly kind = "static-type-variable";
|
48
|
-
constructor(variable: types.Variable);
|
70
|
+
constructor(_analyzer: Analyzer, variable: types.Variable);
|
49
71
|
equals(other: NarrowableReference): boolean;
|
50
72
|
contains(_other: NarrowableReference): boolean;
|
73
|
+
equalsExpression(expression: NarrowableReferenceExpression): boolean;
|
74
|
+
containsExpression(_expression: NarrowableReferenceExpression): boolean;
|
51
75
|
}
|
52
76
|
export class Object implements INarrowableReference {
|
53
77
|
readonly kind = "object";
|
54
78
|
equals(other: NarrowableReference): boolean;
|
55
79
|
contains(_other: NarrowableReference): boolean;
|
80
|
+
equalsExpression(expression: NarrowableReferenceExpression): boolean;
|
81
|
+
containsExpression(_expression: NarrowableReferenceExpression): boolean;
|
56
82
|
}
|
57
83
|
interface INarrowableReference {
|
58
84
|
equals(other: NarrowableReference): boolean;
|
59
85
|
contains(other: NarrowableReference): boolean;
|
86
|
+
/**
|
87
|
+
* Отличается от метода `equals` тем, что выполняет сравнение лениво. Например, при сравнении с выражением
|
88
|
+
* `а.б` сперва будут сравнены части слева от точки (выражение `а` с `receiver`), и только при равенстве будет
|
89
|
+
* связано и сравнено имя `б`. Если выражение `а` не равно `receiver`, то сразу будет возвращено `false` и
|
90
|
+
* связывание для имени `б` выполняться не будет. Такое поведение необходимо при анализе циклов,
|
91
|
+
* чтобы избежать рекурсии.
|
92
|
+
*/
|
93
|
+
equalsExpression(expression: NarrowableReferenceExpression): boolean;
|
94
|
+
containsExpression(expression: NarrowableReferenceExpression): boolean;
|
60
95
|
}
|
61
96
|
export {};
|
62
97
|
}
|
@@ -65,6 +65,9 @@ export declare function isPackageTypeEntity(entity: TypeEntity): entity is Packa
|
|
65
65
|
export type NamedTypeEntity = PackageMethodTypeEntity | PackageStructuredTypeEntity | PackageVariantTypeEntity | AliasTypeEntity | TypeParameterEntity;
|
66
66
|
export type TypeEntityWithMembers = MethodTypeEntity | StructuredTypeEntity | VariantTypeEntity | AliasTypeEntity;
|
67
67
|
export declare function isTypeEntityWithMembers(entity: TypeEntity): entity is TypeEntityWithMembers;
|
68
|
+
export type TypeOrExtensionEntity = TypeEntity | TypeExtensionEntity;
|
69
|
+
export type TypeWithMembersOrExtensionEntity = TypeEntityWithMembers | TypeExtensionEntity;
|
70
|
+
export declare function isTypeWithMembersOrExtensionEntity(entity: Entity): entity is TypeWithMembersOrExtensionEntity;
|
68
71
|
export declare function isTypeEntity(entity: Entity): entity is TypeEntity;
|
69
72
|
export declare function isNamedTypeEntity(entity: TypeEntity): entity is NamedTypeEntity;
|
70
73
|
export type PackageMemberEntity = PackageVariableEntity | PackageMethodEntity | PackageTypeEntity | TypeExtensionEntity;
|
@@ -23,9 +23,8 @@ export declare class Scanner {
|
|
23
23
|
constructor(text: string, options?: ScannerOptions);
|
24
24
|
getToken(): Token;
|
25
25
|
lookAhead(callback: () => boolean): boolean;
|
26
|
-
tryScan(callback: () =>
|
26
|
+
tryScan<T>(callback: () => T): T | undefined;
|
27
27
|
nextToken(): Token;
|
28
|
-
private tryScanOrLookAhead;
|
29
28
|
private isCloseBraceEndingTextTemplate;
|
30
29
|
private scanCharOrTextOrTextTemplateElement;
|
31
30
|
private isSingleCharOrEscapedChar;
|
@@ -1338,20 +1338,19 @@ export declare class StatementBlock extends BaseNode {
|
|
1338
1338
|
constructor(openBraceToken: Token<TokenKind.OpenBrace>, statementList: StatementList, closeBraceToken: Token<TokenKind.CloseBrace>);
|
1339
1339
|
toRed(rangeStart: number, parent: red.StatementBlockParent): red.StatementBlock;
|
1340
1340
|
}
|
1341
|
+
export type ExpressionOrStatementList = Expression | StatementList;
|
1341
1342
|
export declare class FunctionBlock extends BaseNode {
|
1342
1343
|
readonly kind = NodeKind.FunctionBlock;
|
1343
1344
|
readonly children: readonly [
|
1344
1345
|
Token<TokenKind.OpenBrace>,
|
1345
|
-
|
1346
|
-
StatementList | undefined,
|
1346
|
+
ExpressionOrStatementList,
|
1347
1347
|
Token<TokenKind.CloseBrace>
|
1348
1348
|
];
|
1349
1349
|
get openBraceToken(): Token<TokenKind.OpenBrace>;
|
1350
|
-
get
|
1351
|
-
get statementList(): StatementList | undefined;
|
1350
|
+
get expressionOrStatementList(): ExpressionOrStatementList;
|
1352
1351
|
get closeBraceToken(): Token<TokenKind.CloseBrace>;
|
1353
1352
|
protected get thisAsNode(): Node;
|
1354
|
-
constructor(openBraceToken: Token<TokenKind.OpenBrace>,
|
1353
|
+
constructor(openBraceToken: Token<TokenKind.OpenBrace>, expressionOrStatementList: ExpressionOrStatementList, closeBraceToken: Token<TokenKind.CloseBrace>);
|
1355
1354
|
toRed(rangeStart: number, parent: red.FunctionBlockParent): red.FunctionBlock;
|
1356
1355
|
}
|
1357
1356
|
export declare class BreakLoopStatement extends BaseNode {
|
@@ -1306,15 +1306,15 @@ export declare class StatementBlock extends BaseNode {
|
|
1306
1306
|
private createChildren;
|
1307
1307
|
}
|
1308
1308
|
export type FunctionBlockParent = PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageMethodDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | OperatorDeclaration | NestedMethodDeclaration | MethodLiteral | MethodBlockLiteral | PackageConstructorDeclaration | PackageEntryPointDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration;
|
1309
|
+
export type ExpressionOrStatementList = Expression | StatementList;
|
1309
1310
|
export declare class FunctionBlock extends BaseNode {
|
1310
1311
|
readonly kind = NodeKind.FunctionBlock;
|
1311
1312
|
readonly green: green.FunctionBlock;
|
1312
1313
|
readonly parent: FunctionBlockParent;
|
1313
1314
|
private _children;
|
1314
|
-
get children(): readonly [Token<green.TokenKind.OpenBrace>,
|
1315
|
+
get children(): readonly [Token<green.TokenKind.OpenBrace>, ExpressionOrStatementList, Token<green.TokenKind.CloseBrace>];
|
1315
1316
|
get openBraceToken(): Token<TokenKind.OpenBrace>;
|
1316
|
-
get
|
1317
|
-
get statementList(): StatementList | undefined;
|
1317
|
+
get expressionOrStatementList(): ExpressionOrStatementList;
|
1318
1318
|
get closeBraceToken(): Token<TokenKind.CloseBrace>;
|
1319
1319
|
protected get thisAsNode(): Node;
|
1320
1320
|
constructor(green: green.FunctionBlock, rangeStart: number, parent: FunctionBlockParent);
|
@@ -86,6 +86,7 @@ export declare class Constructor implements ITypeMember {
|
|
86
86
|
getEntity(): ConstructorEntity;
|
87
87
|
getSubstitutions(): Substitutions;
|
88
88
|
isHidden(): EntityHidingLevel | undefined;
|
89
|
+
isStatic(): boolean;
|
89
90
|
equals(other: TypeMember): boolean;
|
90
91
|
}
|
91
92
|
export declare class Destructor implements ITypeMember {
|
@@ -98,6 +99,7 @@ export declare class Destructor implements ITypeMember {
|
|
98
99
|
getEntity(): DestructorEntity;
|
99
100
|
getSubstitutions(): Substitutions;
|
100
101
|
isHidden(): EntityHidingLevel | undefined;
|
102
|
+
isStatic(): boolean;
|
101
103
|
applySubstitutions(substitutions: Substitutions): Destructor;
|
102
104
|
equals(other: TypeMember): boolean;
|
103
105
|
}
|
@@ -112,6 +114,7 @@ export declare class Indexer implements ITypeMember {
|
|
112
114
|
getEntity(): IndexerEntity;
|
113
115
|
getSubstitutions(): Substitutions;
|
114
116
|
isHidden(): EntityHidingLevel | undefined;
|
117
|
+
isStatic(): boolean;
|
115
118
|
applySubstitutions(substitutions: Substitutions): Indexer;
|
116
119
|
equals(other: TypeMember): boolean;
|
117
120
|
}
|
@@ -124,11 +127,13 @@ export declare class DereferenceOperator implements ITypeMember {
|
|
124
127
|
getEntity(): DereferenceOperatorEntity;
|
125
128
|
getSubstitutions(): Substitutions;
|
126
129
|
isHidden(): EntityHidingLevel | undefined;
|
130
|
+
isStatic(): boolean;
|
127
131
|
applySubstitutions(substitutions: Substitutions): DereferenceOperator;
|
128
132
|
equals(other: TypeMember): boolean;
|
129
133
|
}
|
130
134
|
export interface ITypeMember {
|
131
135
|
isHidden(): EntityHidingLevel | undefined;
|
136
|
+
isStatic(): boolean;
|
132
137
|
getSubstitutions(): Substitutions;
|
133
138
|
equals(other: TypeMember): boolean;
|
134
139
|
}
|