@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.
Files changed (68) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +12 -56
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +204 -109
  5. package/build/{chunk-VRQPLLYS.js → chunk-5GSDYTF6.js} +6405 -5358
  6. package/build/{chunk-YNR2KYMJ.js → chunk-F5OW64UA.js} +3 -3
  7. package/build/{chunk-MHPX52MT.js → chunk-FHJJX7JY.js} +3 -3
  8. package/build/types/analysis/Analyzer.d.ts +32 -71
  9. package/build/types/analysis/AssignmentChecker.d.ts +11 -0
  10. package/build/types/analysis/CallExpressionMeaning.d.ts +2 -0
  11. package/build/types/analysis/DeclarationsUsageCounter.d.ts +8 -3
  12. package/build/types/analysis/DiagnosticCollector.d.ts +15 -5
  13. package/build/types/analysis/IdentifierExpressionMeaning.d.ts +6 -6
  14. package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +3 -3
  15. package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +9 -9
  16. package/build/types/analysis/NamedTypeResolver.d.ts +3 -2
  17. package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +3 -2
  18. package/build/types/analysis/NodeTypeUtils.d.ts +3 -2
  19. package/build/types/analysis/PackageMemberNameConflictsValidator.d.ts +24 -0
  20. package/build/types/analysis/SourceFileMembers.d.ts +6 -1
  21. package/build/types/analysis/SourcePackageMembersCreator.d.ts +2 -1
  22. package/build/types/analysis/TagMeaning.d.ts +3 -2
  23. package/build/types/analysis/TypeInferrer.d.ts +2 -0
  24. package/build/types/analysis/TypeMemberLookup.d.ts +11 -11
  25. package/build/types/analysis/TypeNarrower.d.ts +0 -69
  26. package/build/types/analysis/control-flow/GraphBuilder.d.ts +6 -2
  27. package/build/types/analysis/control-flow/NarrowableReference.d.ts +73 -0
  28. package/build/types/analysis/control-flow/Nodes.d.ts +9 -0
  29. package/build/types/analysis/control-flow/index.d.ts +1 -0
  30. package/build/types/analysis/semantic-context/Declarations.d.ts +117 -0
  31. package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +22 -0
  32. package/build/types/analysis/semantic-context/SemanticContext.d.ts +13 -0
  33. package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +168 -0
  34. package/build/types/analysis/semantic-context/SemanticContextBasedEntityHidingMatcher.d.ts +14 -0
  35. package/build/types/analysis/semantic-context/SemanticContextBuilder.d.ts +84 -0
  36. package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +45 -0
  37. package/build/types/analysis/semantic-context/SemanticContextWithParent.d.ts +9 -0
  38. package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +42 -0
  39. package/build/types/analysis/semantic-context/SpecialLocalDeclarationsBuilder.d.ts +23 -0
  40. package/build/types/analysis/semantic-context/SubprogramBodyAndParametersSemanticContext.d.ts +89 -0
  41. package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +114 -0
  42. package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +94 -0
  43. package/build/types/analysis/semantic-context/index.d.ts +10 -0
  44. package/build/types/api/Api.d.ts +3 -5
  45. package/build/types/common/Cached.d.ts +1 -0
  46. package/build/types/common/Errors.d.ts +2 -0
  47. package/build/types/common/Lazy.d.ts +4 -0
  48. package/build/types/common/Query.d.ts +2 -1
  49. package/build/types/common/WithDiagnostics.d.ts +4 -3
  50. package/build/types/common/index.d.ts +1 -0
  51. package/build/types/diagnostic/DiagnosticCode.d.ts +89 -68
  52. package/build/types/emitter/IrBuilder.d.ts +1 -1
  53. package/build/types/emitter/Transformer.d.ts +1 -1
  54. package/build/types/entities/FunctionEntity.d.ts +2 -2
  55. package/build/types/entities/VariableEntity.d.ts +48 -19
  56. package/build/types/entities/index.d.ts +4 -0
  57. package/build/types/services/DefinitionService.d.ts +3 -0
  58. package/build/types/tree/KeywordKind.d.ts +31 -30
  59. package/build/types/tree/NodeKind.d.ts +1 -1
  60. package/build/types/tree/green/Nodes.d.ts +33 -29
  61. package/build/types/tree/red/Nodes.d.ts +25 -24
  62. package/build/types/types/TypeFactory.d.ts +0 -2
  63. package/package.json +1 -1
  64. package/build/types/analysis/Lookup.d.ts +0 -28
  65. package/build/types/analysis/Scope.d.ts +0 -205
  66. package/build/types/analysis/SemanticContext.d.ts +0 -367
  67. package/build/types/analysis/SemanticContextBuilder.d.ts +0 -59
  68. package/build/types/analysis/StatementBlockScopeBuilder.d.ts +0 -26
@@ -0,0 +1,84 @@
1
+ import * as tree from '../../tree/index.js';
2
+ import { Analyzer } from '../Analyzer.js';
3
+ import { FunctionDeclaration, IndexedElementAccessorDeclaration, PackageTypeDeclaration, RegularOrBlockFunctionLiteral, SubprogramDeclarationOrLiteral } from '../NodeTypeUtils.js';
4
+ import { BlockSemanticContext, CatchClauseSemanticContext, ConstructorSemanticContext, DestructorSemanticContext, ForStatementSemanticContext, FunctionBlockSemanticContext, FunctionLiteralSemanticContext, FunctionSemanticContext, IndexedElementAccessorSemanticContext, OperatorSemanticContext, OutermostSemanticContextOfSubprogram, OutermostSemanticContextOfType, PackageConstructorSemanticContext, PackageEntryPointSemanticContext, ParametersOfFunctionTypeSemanticContext, SemanticContext, SemanticContextContainingTypeMember, SourceFileSemanticContext, SpecialLocalDeclarationSemanticContext, StatementBlockSemanticContext, SubprogramParameterSemanticContext, SubprogramTypeParameterSemanticContext, TypeBodySemanticContext, TypeDeclarationCreatingSemanticContext, TypeDeclarationWithMembersBody, TypeExtensionBodySemanticContext, TypeParametersOfTypeSemanticContext, VariableAccessorDeclaration, VariableAccessorSemanticContext } from '../semantic-context/index.js';
5
+ export declare class SemanticContextBuilder {
6
+ private readonly _analyzer;
7
+ private readonly _sourceFileContexts;
8
+ private readonly _indexedElementAccessorContexts;
9
+ private readonly _operatorContexts;
10
+ private readonly _fieldWithInitializerContexts;
11
+ private readonly _forStatementContexts;
12
+ private readonly _catchClauseSemanticContexts;
13
+ private readonly _destructorContexts;
14
+ private readonly _constructorContexts;
15
+ private readonly _functionLiteralContexts;
16
+ private readonly _packageEntryPointContexts;
17
+ private readonly _packageConstructorContexts;
18
+ private readonly _variableAccessorContexts;
19
+ private readonly _typeDeclarationTypeParameterContexts;
20
+ private readonly _typeDeclarationBodyContexts;
21
+ private readonly _parametersOfFunctionTypeContext;
22
+ private readonly _statementBlockContexts;
23
+ private readonly _functionBlockContexts;
24
+ private readonly _specialLocalDeclarationContexts;
25
+ private readonly _subprogramTypeParameterContexts;
26
+ private readonly _subprogramParameterContexts;
27
+ private readonly _outermostContextsOfFunctionDeclaration;
28
+ private readonly _outermostContextsOfTypeDeclaration;
29
+ private readonly _typeExtensionDeclarationBodyContexts;
30
+ constructor(analyzer: Analyzer);
31
+ /**
32
+ * Возвращает контекст, содержащий узел. Если в качестве узла передан исходный файл,
33
+ * будет возвращён контекст исходного файла.
34
+ */
35
+ containing(node: tree.Node): SemanticContext;
36
+ containingWithOffset(node: tree.Node, offset: number): SemanticContext;
37
+ ofSourceFile(node: tree.SourceFile): SourceFileSemanticContext;
38
+ ofFunctionDeclarationParameters(node: FunctionDeclaration): SubprogramParameterSemanticContext;
39
+ ofFunctionDeclarationTypeParameters(node: FunctionDeclaration, typeParameterClause: tree.TypeParameterClause): SubprogramTypeParameterSemanticContext;
40
+ outermostSemanticContextOfFunctionDeclaration(node: FunctionDeclaration): FunctionSemanticContext;
41
+ ofOperatorDeclarationParameters(node: tree.OperatorDeclaration): SubprogramParameterSemanticContext;
42
+ outermostSemanticContextOfOperatorDeclaration(node: tree.OperatorDeclaration): OperatorSemanticContext;
43
+ ofTypeDeclarationBody(node: TypeDeclarationWithMembersBody): TypeBodySemanticContext;
44
+ ofFunctionTypeDeclarationParameters(node: tree.FunctionTypeDeclarationBody): ParametersOfFunctionTypeSemanticContext;
45
+ outermostSemanticContextOfTypeDeclaration(node: TypeDeclarationCreatingSemanticContext): OutermostSemanticContextOfType;
46
+ ofTypeDeclarationTypeParameters(node: PackageTypeDeclaration, typeParameterClause: tree.TypeParameterClause): TypeParametersOfTypeSemanticContext;
47
+ ofTypeExtensionDeclarationBody(node: tree.TypeExtensionDeclaration): TypeExtensionBodySemanticContext;
48
+ ofVariableAccessorDeclaration(node: VariableAccessorDeclaration): VariableAccessorSemanticContext;
49
+ ofPackageConstructorDeclaration(node: tree.PackageConstructorDeclaration): PackageConstructorSemanticContext;
50
+ ofPackageEntryPointDeclaration(node: tree.PackageEntryPointDeclaration): PackageEntryPointSemanticContext;
51
+ ofRegularOrBlockFunctionLiteralParameters(node: RegularOrBlockFunctionLiteral): SubprogramParameterSemanticContext;
52
+ outermostSemanticContextOfRegularOrBlockFunctionLiteral(node: RegularOrBlockFunctionLiteral): FunctionLiteralSemanticContext;
53
+ ofForStatement(node: tree.ForStatement): ForStatementSemanticContext;
54
+ ofStatementBlock(node: tree.StatementBlock): StatementBlockSemanticContext;
55
+ ofFunctionBlock(node: tree.FunctionBlock): FunctionBlockSemanticContext;
56
+ withSpecialLocalDeclarations(node: tree.FunctionBlock): SpecialLocalDeclarationSemanticContext;
57
+ ofStatementBlockOrFunctionBlock(node: tree.StatementBlock | tree.FunctionBlock): BlockSemanticContext;
58
+ ofConstructorDeclarationParameters(node: tree.ConstructorDeclaration): SubprogramParameterSemanticContext;
59
+ outermostSemanticContextOfConstructorDeclaration(node: tree.ConstructorDeclaration): ConstructorSemanticContext;
60
+ ofDestructorDeclarationParameters(node: tree.DestructorDeclaration): SubprogramParameterSemanticContext;
61
+ outermostSemanticContextOfDestructorDeclaration(node: tree.DestructorDeclaration): DestructorSemanticContext;
62
+ ofIndexedElementAccessorDeclarationParameters(node: IndexedElementAccessorDeclaration): SubprogramParameterSemanticContext;
63
+ outermostSemanticContextOfIndexedElementAccessorDeclaration(node: IndexedElementAccessorDeclaration): IndexedElementAccessorSemanticContext;
64
+ ofCatchClause(node: tree.CatchClause): CatchClauseSemanticContext;
65
+ ofFieldDeclarationWithInitializer(node: tree.FieldDeclaration): SemanticContext;
66
+ ofSubprogram(node: SubprogramDeclarationOrLiteral): OutermostSemanticContextOfSubprogram;
67
+ containingTypeMember(node: tree.TypeMemberDeclaration): SemanticContextContainingTypeMember;
68
+ containingPackageMember(node: tree.PackageMemberDeclaration): SourceFileSemanticContext;
69
+ private containingInternal;
70
+ private ofChildOfFunctionDeclaration;
71
+ private ofChildOfTypeDeclarationWithMemberBlock;
72
+ private ofChildOfTypeDeclarationBodyWithMemberBlock;
73
+ private ofChildOfFunctionTypeDeclarationBody;
74
+ private ofChildOfFunctionLiteral;
75
+ private ofOperatorDeclarationChild;
76
+ private ofConstructorDeclarationChild;
77
+ private ofDestructorDeclarationChild;
78
+ private ofIndexedElementGetterDeclarationChild;
79
+ private ofIndexedElementSetterDeclarationChild;
80
+ private ofChildOfTypeExtensionDeclaration;
81
+ private isOffsetBetweenNodes;
82
+ private isOffsetInsideStatementBlock;
83
+ private isOffsetInsideFunctionBlock;
84
+ }
@@ -0,0 +1,45 @@
1
+ import { SearchName } from '../../common/index.js';
2
+ import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
3
+ import { IEntityHidingMatcher } from '../../entities/EntityHiding.js';
4
+ import { LocalVariableEntity, NestedFunctionEntity, ParameterVariableEntity, TypeParameterEntity } from '../../entities/index.js';
5
+ import * as tree from '../../tree/index.js';
6
+ import { Analyzer } from '../Analyzer.js';
7
+ import { FoundNamedDeclaration } from '../FoundDeclaration.js';
8
+ import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
9
+ import { SemanticContext } from './SemanticContext.js';
10
+ import { SemanticContextWithParent } from './SemanticContextWithParent.js';
11
+ export declare abstract class SemanticContextValidatingNameConflictsBase extends SemanticContextWithParent implements ISemanticContextValidatingNameConflicts {
12
+ abstract readonly outer: SemanticContext;
13
+ abstract readonly node: tree.Node;
14
+ protected readonly _analyzer: Analyzer;
15
+ private readonly _memberEntities;
16
+ private _memberEntitiesByNameKey;
17
+ private readonly _namedDeclarations;
18
+ private readonly _typesOrContainerWithTypes;
19
+ private readonly _namedDeclarationsByName;
20
+ private readonly _typesOrContainerWithTypesByName;
21
+ private get memberEntities();
22
+ private get namedDeclarations();
23
+ private get typesOrContainerWithTypes();
24
+ private get namedDeclarationsByName();
25
+ private get typesOrContainerWithTypesByName();
26
+ constructor(analyzer: Analyzer);
27
+ protected abstract createMemberEntities(): readonly MemberOfSemanticContextValidatingNameConflicts[];
28
+ protected abstract createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
29
+ getOwnTypesOrContainersWithTypes(_hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
30
+ getOwnTypesOrContainersWithTypesByName(name: SearchName, _hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
31
+ getOwnNamedDeclarations(_noInstanceMembers?: boolean, _hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedDeclaration>[];
32
+ getOwnNamedDeclarationsByName(name: SearchName, _noInstanceMembers?: boolean, _hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedDeclaration>[];
33
+ validateNameConflicts(diagnostics: DiagnosticAcceptor): void;
34
+ private getMemberEntityDictionary;
35
+ private validateNestedFunctionsConflicts;
36
+ private areNestedFunctionSignaturesEqual;
37
+ private createNamedDeclarations;
38
+ private createTypesOrContainerWithTypes;
39
+ }
40
+ interface ISemanticContextValidatingNameConflicts {
41
+ validateNameConflicts(diagnostics: DiagnosticAcceptor): void;
42
+ }
43
+ export type MemberOfSemanticContextValidatingNameConflicts = LocalVariableEntity | ParameterVariableEntity | NestedFunctionEntity | TypeParameterEntity;
44
+ export type MemberOfSemanticContextValidatingNameConflictsForTypeLookup = TypeParameterEntity;
45
+ export {};
@@ -0,0 +1,9 @@
1
+ import { SemanticContext } from './SemanticContext.js';
2
+ import { SemanticContextBase, SubprogramInfo, TryStatementContextKind, TypeOrTypeExtension } from './SemanticContextBase.js';
3
+ export declare abstract class SemanticContextWithParent extends SemanticContextBase {
4
+ abstract readonly outer: SemanticContext;
5
+ getContainingSubprogram(): SubprogramInfo | undefined;
6
+ getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
7
+ getTryStatementContext(): TryStatementContextKind | undefined;
8
+ isStatic(): boolean;
9
+ }
@@ -0,0 +1,42 @@
1
+ import { SearchName } from '../../common/index.js';
2
+ import { IEntityHidingMatcher } from '../../entities/EntityHiding.js';
3
+ import { PackageEntity, TypeEntity, TypeExtensionEntity } from '../../entities/index.js';
4
+ import { SourceFile } from '../../project/SourceFile.js';
5
+ import * as tree from '../../tree/index.js';
6
+ import { Analyzer } from '../Analyzer.js';
7
+ import { FoundNamedDeclaration } from '../FoundDeclaration.js';
8
+ import { LocalizationContext } from '../LocalizationContext.js';
9
+ import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
10
+ import { SemanticContext } from './SemanticContext.js';
11
+ import { SemanticContextBase, SubprogramInfo, TryStatementContextKind, TypeOrTypeExtension } from './SemanticContextBase.js';
12
+ export declare class SourceFileSemanticContext extends SemanticContextBase {
13
+ readonly kind = "source-file";
14
+ readonly outer: SemanticContext | undefined;
15
+ protected asContext: SemanticContext;
16
+ private readonly _analyzer;
17
+ private readonly _sourceFile;
18
+ private readonly _sourceFileMembers;
19
+ private readonly _containingPackageMemberLookup;
20
+ private readonly _importedPackageMemberLookups;
21
+ private readonly _packageNameSegments;
22
+ private readonly _packageNameSegmentsByKey;
23
+ private readonly _locale;
24
+ private get packageNameSegmentsByKey();
25
+ constructor(analyzer: Analyzer, node: tree.SourceFile);
26
+ getContainingSubprogram(): SubprogramInfo | undefined;
27
+ getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
28
+ getSourceFile(): SourceFile;
29
+ getPackage(): PackageEntity;
30
+ getTryStatementContext(): TryStatementContextKind | undefined;
31
+ getLocalizationContext(): LocalizationContext;
32
+ isStatic(): boolean;
33
+ getOwnTypesOrContainersWithTypes(hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
34
+ getOwnTypesOrContainersWithTypesByName(name: SearchName, hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
35
+ getOwnNamedDeclarations(_noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
36
+ getOwnNamedDeclarationsByName(name: SearchName, _noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedDeclaration>[];
37
+ getOwnTypeExtensionsByType(type: TypeEntity, hidingMatcher?: IEntityHidingMatcher): TypeExtensionEntity[];
38
+ private convertPackageMemberToNamedDeclaration;
39
+ private convertPackageAliasToTypeOrContainerWithTypes;
40
+ private convertPackageMemberToTypeOrContainerWithTypes;
41
+ private convertPackageAliasToNamedDeclaration;
42
+ }
@@ -0,0 +1,23 @@
1
+ import { LocalVariableEntity } from '../../entities/VariableEntity.js';
2
+ import * as tree from '../../tree/index.js';
3
+ import { Analyzer } from '../Analyzer.js';
4
+ type SpecialLocalDeclarationEntity = LocalVariableEntity;
5
+ export declare class SpecialLocalDeclarationsBuilder {
6
+ static buildForFunctionBlock(analyzer: Analyzer, node: tree.FunctionBlock): readonly SpecialLocalDeclarationEntity[];
7
+ static buildForFunctionBlockLiteral(analyzer: Analyzer, node: tree.FunctionBlockLiteral): readonly SpecialLocalDeclarationEntity[];
8
+ static buildForPackageFunctionDeclaration(analyzer: Analyzer, node: tree.PackageFunctionDeclaration): readonly SpecialLocalDeclarationEntity[];
9
+ static buildForFieldGetterDeclaration(analyzer: Analyzer, node: tree.FieldGetterDeclaration): readonly SpecialLocalDeclarationEntity[];
10
+ static buildForFieldSetterDeclaration(analyzer: Analyzer, node: tree.FieldSetterDeclaration): readonly SpecialLocalDeclarationEntity[];
11
+ static buildForPackageVariableGetterDeclaration(analyzer: Analyzer, node: tree.PackageVariableGetterDeclaration): readonly SpecialLocalDeclarationEntity[];
12
+ static buildForPackageVariableSetterDeclaration(analyzer: Analyzer, node: tree.PackageVariableSetterDeclaration): readonly SpecialLocalDeclarationEntity[];
13
+ static buildForIndexedElementGetterDeclaration(analyzer: Analyzer, node: tree.IndexedElementGetterDeclaration): readonly SpecialLocalDeclarationEntity[];
14
+ static buildForIndexedElementSetterDeclaration(analyzer: Analyzer, node: tree.IndexedElementSetterDeclaration): readonly SpecialLocalDeclarationEntity[];
15
+ static buildForDereferencedVariableGetterDeclaration(analyzer: Analyzer, node: tree.DereferencedVariableGetterDeclaration): readonly SpecialLocalDeclarationEntity[];
16
+ static buildForDereferencedVariableSetterDeclaration(analyzer: Analyzer, node: tree.DereferencedVariableSetterDeclaration): readonly SpecialLocalDeclarationEntity[];
17
+ static buildForNestedFunctionDeclaration(analyzer: Analyzer, node: tree.NestedFunctionDeclaration): readonly SpecialLocalDeclarationEntity[];
18
+ static buildForFunctionLiteral(analyzer: Analyzer, node: tree.FunctionLiteral): readonly SpecialLocalDeclarationEntity[];
19
+ static buildForConstructorDeclaration(analyzer: Analyzer, node: tree.ConstructorDeclaration): readonly SpecialLocalDeclarationEntity[];
20
+ static buildForMethodDeclaration(analyzer: Analyzer, node: tree.MethodDeclaration): readonly SpecialLocalDeclarationEntity[];
21
+ static buildForOperatorDeclaration(analyzer: Analyzer, node: tree.OperatorDeclaration): readonly SpecialLocalDeclarationEntity[];
22
+ }
23
+ export {};
@@ -0,0 +1,89 @@
1
+ import { DiagnosticAcceptor } from '../../diagnostic/Diagnostic.js';
2
+ import * as tree from '../../tree/index.js';
3
+ import { Analyzer } from '../Analyzer.js';
4
+ import { SemanticContext } from './SemanticContext.js';
5
+ import { TryStatementContextKind } from './SemanticContextBase.js';
6
+ import { MemberOfSemanticContextValidatingNameConflicts, MemberOfSemanticContextValidatingNameConflictsForTypeLookup, SemanticContextValidatingNameConflictsBase } from './SemanticContextValidatingNameConflicts.js';
7
+ import { OutermostSemanticContextOfSubprogram } from './SubprogramSemanticContext.js';
8
+ export type SubprogramTypeParameterSemanticContextParent = OutermostSemanticContextOfSubprogram;
9
+ export declare class SubprogramTypeParameterSemanticContext extends SemanticContextValidatingNameConflictsBase {
10
+ readonly kind = "subprogram-type-parameter";
11
+ readonly outer: SubprogramTypeParameterSemanticContextParent;
12
+ readonly node: tree.TypeParameterClause;
13
+ protected readonly asContext: SemanticContext;
14
+ constructor(analyzer: Analyzer, node: tree.TypeParameterClause, outer: SubprogramTypeParameterSemanticContextParent);
15
+ validateNameConflicts(diagnostics: DiagnosticAcceptor): void;
16
+ protected createMemberEntities(): readonly MemberOfSemanticContextValidatingNameConflicts[];
17
+ protected createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
18
+ }
19
+ export type SubprogramParameterSemanticContextParent = SubprogramTypeParameterSemanticContext | OutermostSemanticContextOfSubprogram;
20
+ export declare abstract class SubprogramParameterSemanticContext extends SemanticContextValidatingNameConflictsBase {
21
+ readonly kind = "subprogram-parameter";
22
+ readonly outer: SubprogramParameterSemanticContextParent;
23
+ constructor(analyzer: Analyzer, outer: SubprogramParameterSemanticContextParent);
24
+ }
25
+ export declare class ExplicitSubprogramParameterSemanticContext extends SubprogramParameterSemanticContext {
26
+ readonly node: tree.ParameterList;
27
+ protected readonly asContext: SemanticContext;
28
+ constructor(analyzer: Analyzer, node: tree.ParameterList, outer: SubprogramParameterSemanticContextParent);
29
+ validateNameConflicts(diagnostics: DiagnosticAcceptor): void;
30
+ protected createMemberEntities(): readonly MemberOfSemanticContextValidatingNameConflicts[];
31
+ protected createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
32
+ }
33
+ export declare class FunctionBlockLiteralParameterSemanticContext extends SubprogramParameterSemanticContext {
34
+ readonly node: tree.FunctionBlockLiteral;
35
+ protected readonly asContext: SemanticContext;
36
+ constructor(analyzer: Analyzer, node: tree.FunctionBlockLiteral, outer: SubprogramParameterSemanticContextParent);
37
+ protected createMemberEntities(): readonly MemberOfSemanticContextValidatingNameConflicts[];
38
+ protected createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
39
+ }
40
+ export type BlockSemanticContext = StatementBlockSemanticContext | FunctionBlockSemanticContext;
41
+ export type StatementBlockSemanticContextParent = StatementBlockSemanticContext | FunctionBlockSemanticContext | ForStatementSemanticContext | CatchClauseSemanticContext;
42
+ export declare class StatementBlockSemanticContext extends SemanticContextValidatingNameConflictsBase {
43
+ readonly kind = "statement-block";
44
+ readonly outer: StatementBlockSemanticContextParent;
45
+ readonly node: tree.StatementBlock;
46
+ protected readonly asContext: SemanticContext;
47
+ constructor(analyzer: Analyzer, node: tree.StatementBlock, outer: StatementBlockSemanticContextParent);
48
+ getTryStatementContext(): TryStatementContextKind | undefined;
49
+ protected createMemberEntities(): readonly MemberOfSemanticContextValidatingNameConflicts[];
50
+ protected createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
51
+ }
52
+ export type FunctionBlockSemanticContextParent = SubprogramParameterSemanticContext | OutermostSemanticContextOfSubprogram | SpecialLocalDeclarationSemanticContext;
53
+ export declare class FunctionBlockSemanticContext extends SemanticContextValidatingNameConflictsBase {
54
+ readonly kind = "function-block";
55
+ readonly outer: FunctionBlockSemanticContextParent;
56
+ readonly node: tree.FunctionBlock;
57
+ protected readonly asContext: SemanticContext;
58
+ constructor(analyzer: Analyzer, node: tree.FunctionBlock, outer: FunctionBlockSemanticContextParent);
59
+ protected createMemberEntities(): readonly MemberOfSemanticContextValidatingNameConflicts[];
60
+ protected createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
61
+ }
62
+ export type SpecialLocalDeclarationSemanticContextParent = SubprogramParameterSemanticContext | OutermostSemanticContextOfSubprogram;
63
+ export declare class SpecialLocalDeclarationSemanticContext extends SemanticContextValidatingNameConflictsBase {
64
+ readonly kind = "special-local-declaration";
65
+ readonly outer: SpecialLocalDeclarationSemanticContextParent;
66
+ readonly node: tree.FunctionBlock;
67
+ protected readonly asContext: SemanticContext;
68
+ constructor(analyzer: Analyzer, node: tree.FunctionBlock, outer: SpecialLocalDeclarationSemanticContextParent);
69
+ protected createMemberEntities(): readonly MemberOfSemanticContextValidatingNameConflicts[];
70
+ protected createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
71
+ }
72
+ export declare class ForStatementSemanticContext extends SemanticContextValidatingNameConflictsBase {
73
+ readonly kind = "for-statement";
74
+ readonly outer: BlockSemanticContext;
75
+ readonly node: tree.ForStatement;
76
+ protected readonly asContext: SemanticContext;
77
+ constructor(analyzer: Analyzer, node: tree.ForStatement, outer: BlockSemanticContext);
78
+ protected createMemberEntities(): readonly MemberOfSemanticContextValidatingNameConflicts[];
79
+ protected createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
80
+ }
81
+ export declare class CatchClauseSemanticContext extends SemanticContextValidatingNameConflictsBase {
82
+ readonly kind = "catch-clause";
83
+ readonly outer: BlockSemanticContext;
84
+ readonly node: tree.CatchClause;
85
+ protected readonly asContext: SemanticContext;
86
+ constructor(analyzer: Analyzer, node: tree.CatchClause, outer: BlockSemanticContext);
87
+ protected createMemberEntities(): readonly MemberOfSemanticContextValidatingNameConflicts[];
88
+ protected createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
89
+ }
@@ -0,0 +1,114 @@
1
+ import { SearchName } from '../../common/index.js';
2
+ import { IEntityHidingMatcher } from '../../entities/EntityHiding.js';
3
+ import * as tree from '../../tree/index.js';
4
+ import { Analyzer } from '../Analyzer.js';
5
+ import { FoundNamedDeclaration } from '../FoundDeclaration.js';
6
+ import { DereferencedVariableAccessorDeclaration, FieldAccessorDeclaration, FunctionDeclaration, IndexedElementAccessorDeclaration, PackageVariableAccessorDeclaration, RegularOrBlockFunctionLiteral } from '../NodeTypeUtils.js';
7
+ import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
8
+ import { SemanticContext } from './SemanticContext.js';
9
+ import { SubprogramInfo, TryStatementContextKind } from './SemanticContextBase.js';
10
+ import { SemanticContextWithParent } from './SemanticContextWithParent.js';
11
+ import { SourceFileSemanticContext } from './SourceFileSemanticContext.js';
12
+ import { SemanticContextContainingTypeMember } from './TypeSemanticContext.js';
13
+ export type LastSemanticContextOfSubprogramParent = SemanticContext;
14
+ /**
15
+ * Завершающий семантический контекст подпрограммы.
16
+ * Данный контекст располагается после контекста с параметрами (или параметрами типа) и переопределяет метод
17
+ * {@link ISemanticContext.getContainingSubprogram}.
18
+ */
19
+ export declare abstract class OutermostSemanticContextOfSubprogram extends SemanticContextWithParent {
20
+ readonly kind = "outermost-of-subprogram";
21
+ abstract getContainingSubprogram(): SubprogramInfo;
22
+ getTryStatementContext(): TryStatementContextKind | undefined;
23
+ getOwnTypesOrContainersWithTypes(_hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
24
+ getOwnTypesOrContainersWithTypesByName(_name: SearchName, _hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
25
+ getOwnNamedDeclarations(_noInstanceMembers?: boolean, _hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedDeclaration>[];
26
+ getOwnNamedDeclarationsByName(_name: SearchName, _noInstanceMembers?: boolean, _hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedDeclaration>[];
27
+ }
28
+ export declare class FunctionSemanticContext extends OutermostSemanticContextOfSubprogram {
29
+ readonly outer: SemanticContext;
30
+ protected readonly asContext: SemanticContext;
31
+ private readonly _analyzer;
32
+ private readonly _node;
33
+ private readonly _subprogramInfo;
34
+ constructor(analyzer: Analyzer, node: FunctionDeclaration, outer: SemanticContext);
35
+ getContainingSubprogram(): SubprogramInfo;
36
+ isStatic(): boolean;
37
+ }
38
+ export declare class PackageConstructorSemanticContext extends OutermostSemanticContextOfSubprogram {
39
+ readonly outer: SourceFileSemanticContext;
40
+ protected readonly asContext: SemanticContext;
41
+ private readonly _analyzer;
42
+ private readonly _node;
43
+ private readonly _subprogramInfo;
44
+ constructor(analyzer: Analyzer, node: tree.PackageConstructorDeclaration, outer: SourceFileSemanticContext);
45
+ getContainingSubprogram(): SubprogramInfo;
46
+ }
47
+ export declare class PackageEntryPointSemanticContext extends OutermostSemanticContextOfSubprogram {
48
+ readonly outer: SourceFileSemanticContext;
49
+ protected readonly asContext: SemanticContext;
50
+ private readonly _analyzer;
51
+ private readonly _node;
52
+ private readonly _subprogramInfo;
53
+ constructor(analyzer: Analyzer, node: tree.PackageEntryPointDeclaration, outer: SourceFileSemanticContext);
54
+ getContainingSubprogram(): SubprogramInfo;
55
+ }
56
+ export declare class OperatorSemanticContext extends OutermostSemanticContextOfSubprogram {
57
+ readonly outer: SemanticContextContainingTypeMember;
58
+ protected readonly asContext: SemanticContext;
59
+ private readonly _analyzer;
60
+ private readonly _node;
61
+ private readonly _subprogramInfo;
62
+ constructor(analyzer: Analyzer, node: tree.OperatorDeclaration, outer: SemanticContextContainingTypeMember);
63
+ getContainingSubprogram(): SubprogramInfo;
64
+ isStatic(): boolean;
65
+ }
66
+ export declare class ConstructorSemanticContext extends OutermostSemanticContextOfSubprogram {
67
+ readonly outer: SemanticContextContainingTypeMember;
68
+ protected readonly asContext: SemanticContext;
69
+ private readonly _analyzer;
70
+ private readonly _node;
71
+ private readonly _subprogramInfo;
72
+ constructor(analyzer: Analyzer, node: tree.ConstructorDeclaration, outer: SemanticContextContainingTypeMember);
73
+ getContainingSubprogram(): SubprogramInfo;
74
+ }
75
+ export declare class DestructorSemanticContext extends OutermostSemanticContextOfSubprogram {
76
+ readonly outer: SemanticContextContainingTypeMember;
77
+ protected readonly asContext: SemanticContext;
78
+ private readonly _analyzer;
79
+ private readonly _node;
80
+ private readonly _subprogramInfo;
81
+ constructor(analyzer: Analyzer, node: tree.DestructorDeclaration, outer: SemanticContextContainingTypeMember);
82
+ getContainingSubprogram(): SubprogramInfo;
83
+ }
84
+ export type AccessorSemanticContextParent = SemanticContextContainingTypeMember | SourceFileSemanticContext;
85
+ export type VariableAccessorDeclaration = PackageVariableAccessorDeclaration | FieldAccessorDeclaration | DereferencedVariableAccessorDeclaration;
86
+ export declare class VariableAccessorSemanticContext extends OutermostSemanticContextOfSubprogram {
87
+ readonly outer: AccessorSemanticContextParent;
88
+ protected readonly asContext: SemanticContext;
89
+ private readonly _analyzer;
90
+ private readonly _node;
91
+ private readonly _subprogramInfo;
92
+ constructor(analyzer: Analyzer, node: VariableAccessorDeclaration, outer: AccessorSemanticContextParent);
93
+ getContainingSubprogram(): SubprogramInfo;
94
+ isStatic(): boolean;
95
+ }
96
+ export declare class IndexedElementAccessorSemanticContext extends OutermostSemanticContextOfSubprogram {
97
+ readonly outer: AccessorSemanticContextParent;
98
+ protected readonly asContext: SemanticContext;
99
+ private readonly _analyzer;
100
+ private readonly _node;
101
+ private readonly _subprogramInfo;
102
+ constructor(analyzer: Analyzer, node: IndexedElementAccessorDeclaration, outer: AccessorSemanticContextParent);
103
+ getContainingSubprogram(): SubprogramInfo;
104
+ isStatic(): boolean;
105
+ }
106
+ export declare class FunctionLiteralSemanticContext extends OutermostSemanticContextOfSubprogram {
107
+ readonly outer: SemanticContext;
108
+ protected readonly asContext: SemanticContext;
109
+ private readonly _analyzer;
110
+ private readonly _node;
111
+ private readonly _subprogramInfo;
112
+ constructor(analyzer: Analyzer, node: RegularOrBlockFunctionLiteral, outer: SemanticContext);
113
+ getContainingSubprogram(): SubprogramInfo;
114
+ }
@@ -0,0 +1,94 @@
1
+ import { SearchName } from '../../common/index.js';
2
+ import { IEntityHidingMatcher } from '../../entities/EntityHiding.js';
3
+ import { OperatorKind } from '../../entities/index.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 { FoundAnonymousDeclaration, FoundNamedDeclaration } from '../FoundDeclaration.js';
8
+ import { FunctionTypeDeclaration, StructuredTypeDeclaration, VariantTypeDeclaration } from '../NodeTypeUtils.js';
9
+ import { TypeMemberLookup } from '../TypeMemberLookup.js';
10
+ import { NamedDeclaration, TypeOrContainerWithTypes } from './Declarations.js';
11
+ import { SemanticContext } from './SemanticContext.js';
12
+ import { SubprogramInfo, TypeOrTypeExtension } from './SemanticContextBase.js';
13
+ import { MemberOfSemanticContextValidatingNameConflicts, MemberOfSemanticContextValidatingNameConflictsForTypeLookup, SemanticContextValidatingNameConflictsBase } from './SemanticContextValidatingNameConflicts.js';
14
+ import { SemanticContextWithParent } from './SemanticContextWithParent.js';
15
+ import { SourceFileSemanticContext } from './SourceFileSemanticContext.js';
16
+ export type TypeDeclarationCreatingSemanticContext = StructuredTypeDeclaration | VariantTypeDeclaration | FunctionTypeDeclaration | tree.PackageAliasTypeDeclaration;
17
+ /**
18
+ * Завершающий семантический контекст типа.
19
+ * Поскольку контекст с параметрами типа является опциональным, необходим
20
+ * ещё один контекст, который гарантированно переопределит метод `getContainingTypeOrTypeExtension`.
21
+ */
22
+ export declare class OutermostSemanticContextOfType extends SemanticContextWithParent {
23
+ readonly kind = "outermost-of-type";
24
+ readonly outer: SemanticContext;
25
+ protected readonly asContext: SemanticContext;
26
+ private readonly _analyzer;
27
+ private readonly _node;
28
+ constructor(analyzer: Analyzer, node: TypeDeclarationCreatingSemanticContext, outer: SemanticContext);
29
+ getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
30
+ getContainingSubprogram(): SubprogramInfo | undefined;
31
+ isStatic(): boolean;
32
+ getOwnTypesOrContainersWithTypes(_hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
33
+ getOwnTypesOrContainersWithTypesByName(_name: SearchName, _hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
34
+ getOwnNamedDeclarations(_noInstanceMembers?: boolean, _hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedDeclaration>[];
35
+ getOwnNamedDeclarationsByName(_name: SearchName, _noInstanceMembers?: boolean, _hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedDeclaration>[];
36
+ private getContainingType;
37
+ }
38
+ type TypeDeclarationWithTypeParameters = tree.PackageStructuredTypeDeclaration | tree.PackageVariantTypeDeclaration | tree.PackageAliasTypeDeclaration | tree.PackageFunctionTypeDeclaration;
39
+ export declare class TypeParametersOfTypeSemanticContext extends SemanticContextValidatingNameConflictsBase {
40
+ readonly kind = "type-parameter-of-type";
41
+ readonly outer: OutermostSemanticContextOfType;
42
+ readonly node: TypeDeclarationWithTypeParameters;
43
+ protected readonly asContext: SemanticContext;
44
+ private readonly _typeParameterClause;
45
+ constructor(analyzer: Analyzer, node: TypeDeclarationWithTypeParameters, typeParameterClause: tree.TypeParameterClause, outer: OutermostSemanticContextOfType);
46
+ protected createMemberEntities(): readonly MemberOfSemanticContextValidatingNameConflicts[];
47
+ protected createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
48
+ }
49
+ declare abstract class TypeOrExtensionBodySemanticContext extends SemanticContextWithParent {
50
+ protected abstract memberLookup: TypeMemberLookup;
51
+ getOwnTypesOrContainersWithTypes(_hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
52
+ getOwnTypesOrContainersWithTypesByName(_name: SearchName, _hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<TypeOrContainerWithTypes>[];
53
+ getOwnNamedDeclarations(noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): FoundNamedDeclaration<NamedDeclaration>[];
54
+ getOwnNamedDeclarationsByName(name: SearchName, noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): readonly FoundNamedDeclaration<NamedDeclaration>[];
55
+ getOwnOperators(noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
56
+ getOwnOperatorsByKind(kind: OperatorKind, noInstanceMembers?: boolean, hidingMatcher?: IEntityHidingMatcher): readonly FoundAnonymousDeclaration<types.Operator>[];
57
+ private convertNamedMember;
58
+ }
59
+ export type TypeDeclarationWithMembersBody = tree.StructuredTypeDeclarationBody | tree.VariantTypeDeclarationBody | tree.AliasTypeDeclarationBody;
60
+ export type SemanticContextContainingTypeMember = TypeBodySemanticContext | TypeExtensionBodySemanticContext;
61
+ export type TypeBodySemanticContextParent = TypeParametersOfTypeSemanticContext | OutermostSemanticContextOfType;
62
+ export declare class TypeBodySemanticContext extends TypeOrExtensionBodySemanticContext {
63
+ readonly kind = "type-body";
64
+ readonly outer: TypeBodySemanticContextParent;
65
+ protected readonly asContext: SemanticContext;
66
+ private readonly _analyzer;
67
+ private readonly _node;
68
+ private readonly _memberLookup;
69
+ protected get memberLookup(): TypeMemberLookup;
70
+ constructor(analyzer: Analyzer, node: TypeDeclarationWithMembersBody, outer: TypeBodySemanticContextParent);
71
+ private getTypeEntity;
72
+ }
73
+ export declare class TypeExtensionBodySemanticContext extends TypeOrExtensionBodySemanticContext {
74
+ readonly kind = "type-extension-body";
75
+ readonly outer: SourceFileSemanticContext;
76
+ protected readonly asContext: SemanticContext;
77
+ private readonly _analyzer;
78
+ private readonly _node;
79
+ private readonly _memberLookup;
80
+ protected get memberLookup(): TypeMemberLookup;
81
+ constructor(analyzer: Analyzer, node: tree.TypeExtensionDeclaration, outer: SourceFileSemanticContext);
82
+ getContainingTypeOrTypeExtension(): TypeOrTypeExtension | undefined;
83
+ }
84
+ export type ParameterOfFunctionTypeSemanticContextParent = TypeParametersOfTypeSemanticContext | OutermostSemanticContextOfType;
85
+ export declare class ParametersOfFunctionTypeSemanticContext extends SemanticContextValidatingNameConflictsBase {
86
+ readonly kind = "parameters-of-function-type";
87
+ readonly outer: ParameterOfFunctionTypeSemanticContextParent;
88
+ readonly node: tree.FunctionTypeDeclarationBody;
89
+ protected readonly asContext: SemanticContext;
90
+ constructor(analyzer: Analyzer, node: tree.FunctionTypeDeclarationBody, outer: ParameterOfFunctionTypeSemanticContextParent);
91
+ protected createMemberEntities(): readonly MemberOfSemanticContextValidatingNameConflicts[];
92
+ protected createMemberEntitiesForTypeLookup(): readonly MemberOfSemanticContextValidatingNameConflictsForTypeLookup[];
93
+ }
94
+ export {};
@@ -0,0 +1,10 @@
1
+ export * from './Declarations.js';
2
+ export * from './FieldWithInitializerSemanticContext.js';
3
+ export * from './SemanticContext.js';
4
+ export * from './SemanticContextBase.js';
5
+ export * from './SemanticContextBuilder.js';
6
+ export * from './SemanticContextValidatingNameConflicts.js';
7
+ export * from './SourceFileSemanticContext.js';
8
+ export * from './SubprogramBodyAndParametersSemanticContext.js';
9
+ export * from './SubprogramSemanticContext.js';
10
+ export * from './TypeSemanticContext.js';
@@ -1,9 +1,9 @@
1
1
  export * from '../analysis/AccessedFunction.js';
2
2
  export * from '../analysis/AnalyzedTranslationPackage.js';
3
3
  export * from '../analysis/Analyzer.js';
4
+ export { MatchResult, MatchResultValueParameter } from '../analysis/ArgumentToParameterMatchResult.js';
4
5
  export type { Meaning as AutotypeCallExpressionMeaning } from '../analysis/AutotypeCallExpressionMeaning.js';
5
6
  export type { Meaning as BaseExpressionMeaning } from '../analysis/BaseExpressionMeaning.js';
6
- export { MatchResult, MatchResultValueParameter } from '../analysis/ArgumentToParameterMatchResult.js';
7
7
  export type { Meaning as CallExpressionMeaning } from '../analysis/CallExpressionMeaning.js';
8
8
  export type { Meaning as DereferenceExpressionMeaning } from '../analysis/DereferenceExpressionMeaning.js';
9
9
  export * from '../analysis/DiagnosticCollector.js';
@@ -15,13 +15,11 @@ export * from '../analysis/ImportedPackageNameTree.js';
15
15
  export type { Meaning as IndexedAccessExpressionMeaning } from '../analysis/IndexedAccessExpressionMeaning.js';
16
16
  export * from '../analysis/Localization.js';
17
17
  export * from '../analysis/LocalizationContext.js';
18
- export * from '../analysis/Lookup.js';
18
+ export type { Meaning as MemberAccessExpressionMeaning, ResolutionResult as MemberAccessExpressionResolutionResult } from '../analysis/MemberAccessExpressionMeaning.js';
19
19
  export * from '../analysis/NodeTypeUtils.js';
20
20
  export type { Meaning as ObjectExpressionMeaning } from '../analysis/ObjectExpressionMeaning.js';
21
21
  export * from '../analysis/PackageMemberLookup.js';
22
- export type { Meaning as MemberAccessExpressionMeaning, ResolutionResult as MemberAccessExpressionResolutionResult } from '../analysis/MemberAccessExpressionMeaning.js';
23
- export type { IScope, NamedDeclaration, TypeOrContainerWithTypes } from '../analysis/Scope.js';
24
- export * from '../analysis/SemanticContext.js';
22
+ export * as semanticContext from '../analysis/semantic-context/index.js';
25
23
  export * from '../analysis/SourceFileMembers.js';
26
24
  export * from '../analysis/SourcePackageDependencyGraph.js';
27
25
  export * from '../analysis/SubstitutedFunction.js';
@@ -4,4 +4,5 @@ export declare class Cached<T> {
4
4
  private _isEvaluating;
5
5
  getOrInsertWith(fn: () => T): T;
6
6
  clear(): void;
7
+ getCachedValue(): T | undefined;
7
8
  }
@@ -0,0 +1,2 @@
1
+ export declare class RecursiveAnalysisError extends Error {
2
+ }
@@ -7,3 +7,7 @@ export declare class Lazy<T> {
7
7
  get value(): T;
8
8
  getCachedValue(): T | undefined;
9
9
  }
10
+ export type MaybeLazy<T> = Lazy<T> | T;
11
+ export declare namespace MaybeLazy {
12
+ function getValue<T>(maybeLazy: MaybeLazy<T>): T;
13
+ }
@@ -1,3 +1,4 @@
1
+ import { MaybeLazy } from './Lazy.js';
1
2
  export declare abstract class Query<T> implements Iterable<T> {
2
3
  static from<T>(source: Iterable<T>): Query<T>;
3
4
  static fromNullable<T>(source: Iterable<T> | undefined): Query<T>;
@@ -15,7 +16,7 @@ export declare abstract class Query<T> implements Iterable<T> {
15
16
  flatMap<K>(fn: (t: T) => Iterable<K>): Query<K>;
16
17
  toArray(): T[];
17
18
  count(fn?: (t: T) => boolean): number;
18
- chain(other: Iterable<T>): Query<T>;
19
+ chain(other: MaybeLazy<Iterable<T>>): Query<T>;
19
20
  filter<K extends T>(fn: (t: T) => t is K): Query<K>;
20
21
  filter(fn: (t: T) => boolean): Query<T>;
21
22
  mapAndFilter<K>(fn: (t: T) => K | undefined): Query<K>;
@@ -1,4 +1,5 @@
1
1
  import { Diagnostic } from '../diagnostic/Diagnostic.js';
2
+ import { MaybeLazy } from './Lazy.js';
2
3
  export type WithDiagnostics<T> = WithDiagnostics_ok<T> | WithDiagnostics_error<T>;
3
4
  export declare class WithDiagnostics_ok<T> implements IWithDiagnostics<T> {
4
5
  readonly value: T;
@@ -8,9 +9,9 @@ export declare class WithDiagnostics_ok<T> implements IWithDiagnostics<T> {
8
9
  }
9
10
  export declare class WithDiagnostics_error<T> implements IWithDiagnostics<T> {
10
11
  readonly kind = "error";
11
- readonly value: readonly Diagnostic[];
12
- constructor(diagnostic: Diagnostic);
13
- constructor(diagnostics: readonly Diagnostic[]);
12
+ readonly value: readonly MaybeLazy<Diagnostic>[];
13
+ constructor(diagnostic: MaybeLazy<Diagnostic>);
14
+ constructor(diagnostics: readonly MaybeLazy<Diagnostic>[]);
14
15
  toNullable(): T | undefined;
15
16
  }
16
17
  interface IWithDiagnostics<T> {
@@ -5,6 +5,7 @@ export * from './CancellationToken.js';
5
5
  export * from './Constants.js';
6
6
  export * from './Debug.js';
7
7
  export * from './Delayed.js';
8
+ export * from './Errors.js';
8
9
  export * from './FormatString.js';
9
10
  export * from './Interner.js';
10
11
  export * from './JavaScriptIdentifier.js';