@artel/artc 0.6.25191
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 +20 -0
- package/build/api/Api.js +664 -0
- package/build/api/ApiNodeJS.js +20 -0
- package/build/api/ApiServices.js +12847 -0
- package/build/chunk-BQHCAH6D.js +588 -0
- package/build/chunk-O2JKESUU.js +63219 -0
- package/build/chunk-QRBDQKYM.js +94 -0
- package/build/types/Cli.d.ts +3 -0
- package/build/types/analysis/AccessedMethod.d.ts +53 -0
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +191 -0
- package/build/types/analysis/Analyzer.d.ts +665 -0
- package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +25 -0
- package/build/types/analysis/BaseExpressionMeaning.d.ts +47 -0
- package/build/types/analysis/BuiltInOperators.d.ts +14 -0
- package/build/types/analysis/CallArgumentToParameterMatchResult.d.ts +30 -0
- package/build/types/analysis/CallArgumentsToParametersMatcher.d.ts +44 -0
- package/build/types/analysis/CallExpressionMeaning.d.ts +39 -0
- package/build/types/analysis/ConstructorOverloadResolver.d.ts +34 -0
- package/build/types/analysis/DeclarationsUsageCounter.d.ts +18 -0
- package/build/types/analysis/DereferenceExpressionMeaning.d.ts +23 -0
- package/build/types/analysis/DiagnosticCollector.d.ts +68 -0
- package/build/types/analysis/EntityLocalizationHelper.d.ts +15 -0
- package/build/types/analysis/FindModifier.d.ts +4 -0
- package/build/types/analysis/FoundDeclaration.d.ts +19 -0
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +98 -0
- package/build/types/analysis/ImportedPackageNameTree.d.ts +22 -0
- package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +26 -0
- package/build/types/analysis/IndexerAccess.d.ts +10 -0
- package/build/types/analysis/Localization.d.ts +54 -0
- package/build/types/analysis/LocalizationContext.d.ts +15 -0
- package/build/types/analysis/Lookup.d.ts +23 -0
- package/build/types/analysis/NamedTypeResolver.d.ts +42 -0
- package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +20 -0
- package/build/types/analysis/NodeTypeUtils.d.ts +28 -0
- package/build/types/analysis/ObjectExpressionMeaning.d.ts +38 -0
- package/build/types/analysis/OperationOverloadResolver.d.ts +19 -0
- package/build/types/analysis/OverloadResolver.d.ts +12 -0
- package/build/types/analysis/PackageMemberLookup.d.ts +15 -0
- package/build/types/analysis/PrefixUnaryOperatorResolver.d.ts +27 -0
- package/build/types/analysis/PropertyAccessExpressionMeaning.d.ts +100 -0
- package/build/types/analysis/Scope.d.ts +309 -0
- package/build/types/analysis/SemanticContext.d.ts +320 -0
- package/build/types/analysis/SemanticContextBuilder.d.ts +54 -0
- package/build/types/analysis/SourceFileMembers.d.ts +92 -0
- package/build/types/analysis/SourcePackageDependencyGraph.d.ts +41 -0
- package/build/types/analysis/SourcePackageMembersCreator.d.ts +6 -0
- package/build/types/analysis/StatementBlockScopeBuilder.d.ts +22 -0
- package/build/types/analysis/SubstitutedMethod.d.ts +49 -0
- package/build/types/analysis/TagMeaning.d.ts +26 -0
- package/build/types/analysis/Tags.d.ts +29 -0
- package/build/types/analysis/TargetTypeHint.d.ts +5 -0
- package/build/types/analysis/TypeInferrer.d.ts +9 -0
- package/build/types/analysis/TypeMemberLookup.d.ts +27 -0
- package/build/types/analysis/TypeOverloadResolver.d.ts +7 -0
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +37 -0
- package/build/types/analysis/Utils.d.ts +17 -0
- package/build/types/analysis/VariableAccess.d.ts +10 -0
- package/build/types/analysis/VariantLookup.d.ts +20 -0
- package/build/types/analysis/Visitor.d.ts +7 -0
- package/build/types/analysis/WellKnownDeclarations.d.ts +34 -0
- package/build/types/analysis/index.d.ts +8 -0
- package/build/types/api/Api.d.ts +59 -0
- package/build/types/api/ApiNodeJS.d.ts +5 -0
- package/build/types/api/ApiServices.d.ts +3 -0
- package/build/types/common/AccessKind.d.ts +4 -0
- package/build/types/common/ArtelFileCheck.d.ts +2 -0
- package/build/types/common/Cached.d.ts +6 -0
- package/build/types/common/CancellationToken.d.ts +13 -0
- package/build/types/common/Constants.d.ts +19 -0
- package/build/types/common/Debug.d.ts +10 -0
- package/build/types/common/Delayed.d.ts +7 -0
- package/build/types/common/ErrorHandlingStrategy.d.ts +3 -0
- package/build/types/common/FormatString.d.ts +5 -0
- package/build/types/common/HelperPhrases.d.ts +11 -0
- package/build/types/common/Interner.d.ts +4 -0
- package/build/types/common/L10nConfig.d.ts +1 -0
- package/build/types/common/Lazy.d.ts +9 -0
- package/build/types/common/LocalizationHelper.d.ts +10 -0
- package/build/types/common/Logger.d.ts +10 -0
- package/build/types/common/Name.d.ts +83 -0
- package/build/types/common/NameFormatConversion.d.ts +12 -0
- package/build/types/common/NonEmptyArray.d.ts +8 -0
- package/build/types/common/Option.d.ts +28 -0
- package/build/types/common/PackageDialect.d.ts +5 -0
- package/build/types/common/PackageLocale.d.ts +15 -0
- package/build/types/common/PackageLocaleGuard.d.ts +1 -0
- package/build/types/common/Path.d.ts +8 -0
- package/build/types/common/PerformanceMeasurement.d.ts +20 -0
- package/build/types/common/Query.d.ts +39 -0
- package/build/types/common/Range.d.ts +10 -0
- package/build/types/common/Result.d.ts +13 -0
- package/build/types/common/SearchName.d.ts +13 -0
- package/build/types/common/ThrottledCancellationToken.d.ts +17 -0
- package/build/types/common/TreeQuery.d.ts +53 -0
- package/build/types/common/TreeTraversal.d.ts +13 -0
- package/build/types/common/Uri.d.ts +28 -0
- package/build/types/common/UriTree.d.ts +41 -0
- package/build/types/common/UserLocale.d.ts +2 -0
- package/build/types/common/WithDiagnostics.d.ts +19 -0
- package/build/types/common/YieldExecution.d.ts +1 -0
- package/build/types/common/index.d.ts +32 -0
- package/build/types/diagnostic/Diagnostic.d.ts +21 -0
- package/build/types/diagnostic/DiagnosticCode.d.ts +146 -0
- package/build/types/diagnostic/DiagnosticData.d.ts +20 -0
- package/build/types/diagnostic/DiagnosticFormatter.d.ts +8 -0
- package/build/types/diagnostic/RangeDiagnostic.d.ts +19 -0
- package/build/types/emitter/BlockStatementTransformationResult.d.ts +10 -0
- package/build/types/emitter/CustomModuleLoader.d.ts +1 -0
- package/build/types/emitter/DebugStack.d.ts +10 -0
- package/build/types/emitter/Emitter.d.ts +61 -0
- package/build/types/emitter/EmitterContext.d.ts +342 -0
- package/build/types/emitter/EmitterGeneratedDeclarationKind.d.ts +36 -0
- package/build/types/emitter/EmitterPackage.d.ts +60 -0
- package/build/types/emitter/EntityNameProviders.d.ts +33 -0
- package/build/types/emitter/ExpressionTransformationResult.d.ts +17 -0
- package/build/types/emitter/GeneralLowering.d.ts +72 -0
- package/build/types/emitter/Internal.d.ts +10 -0
- package/build/types/emitter/IntrinsicEntities.d.ts +118 -0
- package/build/types/emitter/IrBuilder.d.ts +108 -0
- package/build/types/emitter/IrToJs.d.ts +113 -0
- package/build/types/emitter/JavaScriptName.d.ts +1 -0
- package/build/types/emitter/PackageMemberDeclarationTransformationResult.d.ts +17 -0
- package/build/types/emitter/SimpleTransformationResult.d.ts +14 -0
- package/build/types/emitter/StatementTransformationResult.d.ts +16 -0
- package/build/types/emitter/StructuredTypeMemberDeclarationTransformationResult.d.ts +13 -0
- package/build/types/emitter/TransformationContinuationAction.d.ts +4 -0
- package/build/types/emitter/Transformer.d.ts +282 -0
- package/build/types/emitter/TypeAccessExpressionTransformationResult.d.ts +12 -0
- package/build/types/emitter/error-boundary.d.ts +10 -0
- package/build/types/emitter/index.d.ts +1 -0
- package/build/types/emitter/ir/AccessedEntities.d.ts +19 -0
- package/build/types/emitter/ir/LoweringOptions.d.ts +34 -0
- package/build/types/emitter/ir/Nodes.d.ts +1585 -0
- package/build/types/emitter/ir/SourceLocation.d.ts +10 -0
- package/build/types/emitter/ir/index.d.ts +5 -0
- package/build/types/emitter/ir/types.d.ts +10 -0
- package/build/types/entities/AliasTypeEntity.d.ts +84 -0
- package/build/types/entities/BinaryOperatorEntity.d.ts +48 -0
- package/build/types/entities/ConstructorEntity.d.ts +99 -0
- package/build/types/entities/DereferenceOperatorEntity.d.ts +40 -0
- package/build/types/entities/DestructorEntity.d.ts +31 -0
- package/build/types/entities/EntityHiding.d.ts +27 -0
- package/build/types/entities/EntityNaming.d.ts +12 -0
- package/build/types/entities/GetterEntity.d.ts +86 -0
- package/build/types/entities/IndexerEntity.d.ts +51 -0
- package/build/types/entities/MethodEntity.d.ts +174 -0
- package/build/types/entities/MethodTypeEntity.d.ts +98 -0
- package/build/types/entities/PackageAliasEntity.d.ts +30 -0
- package/build/types/entities/PackageEntity.d.ts +56 -0
- package/build/types/entities/PackageMembers.d.ts +98 -0
- package/build/types/entities/SetterEntity.d.ts +78 -0
- package/build/types/entities/StructuredTypeEntity.d.ts +199 -0
- package/build/types/entities/SubstitutionApplicationMode.d.ts +4 -0
- package/build/types/entities/TypeEntityMembers.d.ts +36 -0
- package/build/types/entities/TypeExtensionEntity.d.ts +33 -0
- package/build/types/entities/TypeMemberContainer.d.ts +23 -0
- package/build/types/entities/TypeParameterEntity.d.ts +94 -0
- package/build/types/entities/UnaryOperatorEntity.d.ts +33 -0
- package/build/types/entities/VariableEntity.d.ts +423 -0
- package/build/types/entities/VariantEntity.d.ts +31 -0
- package/build/types/entities/VariantTypeEntity.d.ts +83 -0
- package/build/types/entities/Variants.d.ts +10 -0
- package/build/types/entities/index.d.ts +87 -0
- package/build/types/executor/CommandLineCompiler.d.ts +8 -0
- package/build/types/executor/Compiler.d.ts +15 -0
- package/build/types/executor/FileSystemUri.d.ts +5 -0
- package/build/types/executor/NodeCompiler.d.ts +39 -0
- package/build/types/executor/PhysicalFileSystem.d.ts +12 -0
- package/build/types/executor/PhysicalTypeScriptLibrariesProvider.d.ts +12 -0
- package/build/types/generated/BuiltInSystemPackages.d.ts +3 -0
- package/build/types/old/Executor.d.ts +14 -0
- package/build/types/old/JavaScriptEmitter.d.ts +1 -0
- package/build/types/old/JavaScriptEmittingVisitor.d.ts +1 -0
- package/build/types/old/NzonParser.d.ts +1 -0
- package/build/types/old/NzonScanner.d.ts +1 -0
- package/build/types/old/NzonSyntax.d.ts +1 -0
- package/build/types/old/RemoteWorkspaceFileSystem.d.ts +1 -0
- package/build/types/parser/CharacterCodes.d.ts +21 -0
- package/build/types/parser/ConvertTokenKind.d.ts +3 -0
- package/build/types/parser/KeywordDictionary.d.ts +12 -0
- package/build/types/parser/ParseNumber.d.ts +5 -0
- package/build/types/parser/Parser.d.ts +7 -0
- package/build/types/parser/ParserDiagnostic.d.ts +7 -0
- package/build/types/parser/ReservedIdentifierDictionary.d.ts +12 -0
- package/build/types/parser/Scanner.d.ts +60 -0
- package/build/types/parser/TokenKind.d.ts +73 -0
- package/build/types/parser/UnescapeText.d.ts +2 -0
- package/build/types/project/Compilation.d.ts +21 -0
- package/build/types/project/CompilationLoader.d.ts +104 -0
- package/build/types/project/FileSystemTree.d.ts +70 -0
- package/build/types/project/PackageConfigurationSerializer.d.ts +1 -0
- package/build/types/project/Position.d.ts +5 -0
- package/build/types/project/SourceFile.d.ts +21 -0
- package/build/types/project/SourcePackage.d.ts +151 -0
- package/build/types/project/TextFile.d.ts +11 -0
- package/build/types/project/configuration/BuildPackageApi.d.ts +75 -0
- package/build/types/project/configuration/ConfigurationConverter.d.ts +25 -0
- package/build/types/project/configuration/ConfigurationFileParser.d.ts +26 -0
- package/build/types/project/configuration/PackageConfigurationInterpreter.d.ts +27 -0
- package/build/types/project/configuration/types/PackageConfigurationEn.d.ts +90 -0
- package/build/types/project/configuration/types/PackageConfigurationRu.d.ts +91 -0
- package/build/types/project/index.d.ts +12 -0
- package/build/types/services/AddPropertyAssignmentService.d.ts +15 -0
- package/build/types/services/CompletionService.d.ts +95 -0
- package/build/types/services/CustomCommand.d.ts +120 -0
- package/build/types/services/DefinitionService.d.ts +19 -0
- package/build/types/services/DisplayService.d.ts +830 -0
- package/build/types/services/DocumentHighlightsService.d.ts +18 -0
- package/build/types/services/EvaluatableExpressionService.d.ts +15 -0
- package/build/types/services/FileSystemTreeDisplayService.d.ts +7 -0
- package/build/types/services/HoverService.d.ts +17 -0
- package/build/types/services/LanguageServer.d.ts +125 -0
- package/build/types/services/NodeSemanticInfo.d.ts +132 -0
- package/build/types/services/ProjectItemsService.d.ts +6 -0
- package/build/types/services/ReferencesService.d.ts +30 -0
- package/build/types/services/RenameService.d.ts +16 -0
- package/build/types/services/SelectionRangeService.d.ts +12 -0
- package/build/types/services/SemanticTokensService.d.ts +40 -0
- package/build/types/services/SourceFileItemsService.d.ts +42 -0
- package/build/types/services/TranslationService.d.ts +23 -0
- package/build/types/services/TreeUtils.d.ts +58 -0
- package/build/types/services/TypeDefinitionService.d.ts +9 -0
- package/build/types/services/Types.d.ts +22 -0
- package/build/types/services/Utils.d.ts +5 -0
- package/build/types/services/signature-help/SignatureHelpService.d.ts +17 -0
- package/build/types/services/signature-help/SignatureWithValueParameters.d.ts +114 -0
- package/build/types/services/signature-help/TypeParameterSignatureHelpProvider.d.ts +20 -0
- package/build/types/services/signature-help/ValueParametersSignatureHelpProvider.d.ts +15 -0
- package/build/types/services/signature-help/utils.d.ts +9 -0
- package/build/types/services/source-generation/EntityToSyntax.d.ts +47 -0
- package/build/types/services/source-generation/SourceGenerationService.d.ts +22 -0
- package/build/types/services/workspace/ClientTrackedSourceFiles.d.ts +41 -0
- package/build/types/services/workspace/CompilationController.d.ts +108 -0
- package/build/types/services/workspace/FileSystemTreeProviderBasedOnWatchedFileSystem.d.ts +61 -0
- package/build/types/services/workspace/ManuallyUpdatedFileSystemTreeProvider.d.ts +21 -0
- package/build/types/services/workspace/Workspace.d.ts +59 -0
- package/build/types/services/workspace/WorkspaceFileSystem.d.ts +5 -0
- package/build/types/services/workspace/WorkspaceFiles.d.ts +35 -0
- package/build/types/services/workspace/index.d.ts +7 -0
- package/build/types/tree/KeywordKind.d.ts +64 -0
- package/build/types/tree/NodeKind.d.ts +163 -0
- package/build/types/tree/TokenKind.d.ts +132 -0
- package/build/types/tree/TriviaKind.d.ts +7 -0
- package/build/types/tree/green/BaseNode.d.ts +12 -0
- package/build/types/tree/green/Nodes.d.ts +2235 -0
- package/build/types/tree/green/SyntaxFactory.d.ts +67 -0
- package/build/types/tree/green/SyntaxToCode.d.ts +116 -0
- package/build/types/tree/green/Token.d.ts +37 -0
- package/build/types/tree/green/Utils.d.ts +2 -0
- package/build/types/tree/green/index.d.ts +7 -0
- package/build/types/tree/index.d.ts +4 -0
- package/build/types/tree/red/BaseNode.d.ts +15 -0
- package/build/types/tree/red/Internal.d.ts +2 -0
- package/build/types/tree/red/NodePath.d.ts +10 -0
- package/build/types/tree/red/Nodes.d.ts +2237 -0
- package/build/types/tree/red/Token.d.ts +29 -0
- package/build/types/tree/red/Utils.d.ts +6 -0
- package/build/types/tree/red/index.d.ts +6 -0
- package/build/types/ts-interop/Entities.d.ts +634 -0
- package/build/types/ts-interop/TsInteropContext.d.ts +179 -0
- package/build/types/ts-interop/TsLibrariesProvider.d.ts +12 -0
- package/build/types/ts-interop/TsPackageContents.d.ts +64 -0
- package/build/types/ts-interop/TsPackageMembersCreator.d.ts +69 -0
- package/build/types/ts-interop/TsProgramLoader.d.ts +38 -0
- package/build/types/ts-interop/TsTypeMembersCreator.d.ts +45 -0
- package/build/types/ts-interop/Utils.d.ts +43 -0
- package/build/types/types/AliasType.d.ts +20 -0
- package/build/types/types/Internal.d.ts +1 -0
- package/build/types/types/MethodType.d.ts +23 -0
- package/build/types/types/ParameterType.d.ts +19 -0
- package/build/types/types/StandardTypes.d.ts +42 -0
- package/build/types/types/StructuredType.d.ts +25 -0
- package/build/types/types/Substitutions.d.ts +18 -0
- package/build/types/types/Type.d.ts +16 -0
- package/build/types/types/TypeFactory.d.ts +15 -0
- package/build/types/types/TypeMembers.d.ts +134 -0
- package/build/types/types/UnionType.d.ts +20 -0
- package/build/types/types/UnresolvedType.d.ts +16 -0
- package/build/types/types/VariantType.d.ts +19 -0
- package/build/types/types/index.d.ts +12 -0
- package/package.json +73 -0
@@ -0,0 +1,342 @@
|
|
1
|
+
import { SourcePackageDependencyGraph } from '../analysis/SourcePackageDependencyGraph.js';
|
2
|
+
import * as tags from '../analysis/Tags.js';
|
3
|
+
import { Analyzer } from '../analysis/index.js';
|
4
|
+
import { CancellationToken, PackageLocale, Uri } from '../common/index.js';
|
5
|
+
import { OriginalPackageMembers } from '../entities/PackageMembers.js';
|
6
|
+
import { AliasTypeEntity, ConstructorEntity, DereferenceOperatorEntity, Entity, EntityKind, IndexerEntity, InterfacePackageEntityInfo, MethodEntity, MethodTypeEntity, PackageAliasEntity, PackageEntity, PackageEntityDefinition, PackageMemberEntity, PackageVariableEntity, StructuredTypeEntity, TypeEntity, TypeEntityWithMembers, TypeMethodEntity, TypeParameterEntity, TypeVariableEntity, VariableEntity, VariantEntity, VariantTypeEntity } from '../entities/index.js';
|
7
|
+
import { JavaScriptImplementationConfig, PackageName, PlatformKind, ProgramPackage, SourceFile as ProjectSourceFile } from '../project/index.js';
|
8
|
+
import * as types from '../types/index.js';
|
9
|
+
import { EmitterPackage } from './EmitterPackage.js';
|
10
|
+
import { EntityNameProvider, RegisteredEntityNames } from './EntityNameProviders.js';
|
11
|
+
import * as ir from './ir/index.js';
|
12
|
+
import { AssignmentExpression, AssignmentOperator, BaseConstructorCallExpression, BinaryExpressionOperator, BlockStatement, CallArguments, Expression, MethodAccessExpression, OrderedCallArguments, OwnConstructorCallExpression, SourceFile, TypeMethodAccessExpression, TypeVariableAccessExpression, UnorderedCallArguments, VariableAccessExpression } from './ir/index.js';
|
13
|
+
export declare class EmitterContext {
|
14
|
+
readonly analyzer: Analyzer;
|
15
|
+
readonly targetPlatform: PlatformKind;
|
16
|
+
readonly extensionLikeMembers: ExtensionLikeMembers;
|
17
|
+
readonly type: Type;
|
18
|
+
readonly utils: Utils;
|
19
|
+
readonly membersForCopyOnWrite: MembersForCopyOnWriteContext;
|
20
|
+
readonly realName: RealName;
|
21
|
+
readonly linker: ExternalDeclarationLinker;
|
22
|
+
readonly helperMethods: HelperMethods;
|
23
|
+
readonly jsStandardTypes: JsStandardTypes;
|
24
|
+
readonly generatedName: GeneratedName;
|
25
|
+
private readonly _declarationsUsageCountResults;
|
26
|
+
private readonly _emitterPackages;
|
27
|
+
private readonly _packageMethodByPackageVariableGetter;
|
28
|
+
private readonly _packageMethodByPackageVariableSetter;
|
29
|
+
private readonly _typeMethodByIndexedGetter;
|
30
|
+
private readonly _typeMethodByIndexedSetter;
|
31
|
+
private readonly _typeDereferencedVariableVariableByDereferenceOperator;
|
32
|
+
private readonly _overloadedConstructorGroupByType;
|
33
|
+
private readonly _typeMethodNamesByType;
|
34
|
+
private readonly _typeMethodByPlainObjectConstructor;
|
35
|
+
private readonly _plainObjectDefaultEmptyConstructorByPlainObject;
|
36
|
+
private readonly _proxyTypeVariables;
|
37
|
+
private readonly _lazySystemJsPackage;
|
38
|
+
private readonly _esPackage;
|
39
|
+
private readonly _packageByPackageMember;
|
40
|
+
private readonly _registeredEntityNamesForCompilation;
|
41
|
+
private _packageGraph;
|
42
|
+
private readonly _isConstantPlainObjectResults;
|
43
|
+
get systemPackage(): PackageEntity;
|
44
|
+
get systemJsPackage(): PackageEntity;
|
45
|
+
get jsPlatformPackage(): PackageEntity;
|
46
|
+
get standardTypes(): types.StandardTypes;
|
47
|
+
get packageByPackageMember(): ReadonlyMap<Entity, EmitterPackage>;
|
48
|
+
get registeredEntityNamesForCompilation(): RegisteredEntityNames;
|
49
|
+
get packageGraph(): SourcePackageDependencyGraph;
|
50
|
+
private constructor();
|
51
|
+
static create(analyzer: Analyzer, cancellationToken: CancellationToken | undefined, targetPlatform?: PlatformKind): Promise<EmitterContext>;
|
52
|
+
buildIR(sourceFile: ProjectSourceFile): ir.SourceFile;
|
53
|
+
enumerateEmittingPackages(): Iterable<EmitterPackage>;
|
54
|
+
enumerateEmittingSourcePackages(): Iterable<ProgramPackage>;
|
55
|
+
/**
|
56
|
+
* Главным считается файл главного пакета, в котором находится блок "при создании" или блок "выполнить".
|
57
|
+
*/
|
58
|
+
getMainFileUri(): Uri | undefined;
|
59
|
+
getTypeIndexedElementGetter(indexer: IndexerEntity): TypeMethodEntity;
|
60
|
+
getTypeIndexedElementSetter(indexer: IndexerEntity): TypeMethodEntity;
|
61
|
+
getTypeDereferencedVariableVariable(operator: DereferenceOperatorEntity): TypeVariableEntity;
|
62
|
+
getPackageMethodForPackageVariableGetter(variable: PackageVariableEntity): MethodEntity;
|
63
|
+
getPackageMethodForPackageVariableSetter(variable: PackageVariableEntity): MethodEntity;
|
64
|
+
getOverloadedConstructorGroupForType(entity: TypeEntityWithMembers): OverloadedConstructorGroup;
|
65
|
+
getTypeMethodNames(entity: TypeEntityWithMembers): UniqueEntityNames;
|
66
|
+
getTypeMethodForPlainObjectConstructor(entity: ConstructorEntity, containingType: TypeEntityWithMembers): TypeMethodEntity;
|
67
|
+
getPlainObjectDefaultEmptyConstructor(entity: StructuredTypeEntity): ConstructorEntity;
|
68
|
+
createUniqueNamesForReferencedPackageMemberEntities(ownNames: UniqueEntityNames, referencedEntities: ReferencedPackageMemberEntities): UniqueEntityNames;
|
69
|
+
createImportDirectivesForPackage(referencedEntities: ReferencedPackageMemberEntities, referencedEntityNames: UniqueEntityNames, mode: ImportDirectivesCreationMode, fileLocale: PackageLocale): readonly ir.Statement[];
|
70
|
+
/**
|
71
|
+
* Проверяет, является ли простой объект константным. Если объект является таковым, для него не нужно выполнять
|
72
|
+
* copy-on-write.
|
73
|
+
*
|
74
|
+
* @returns Возвращает `true`, если
|
75
|
+
* 1. Все поля объекта - конст.
|
76
|
+
* 2. Типы всех полей либо не являются простыми объектами, либо являются константными простыми объектами.
|
77
|
+
*/
|
78
|
+
isConstantPlainObject(entity: StructuredTypeEntity, entitiesBeingChecked?: Set<StructuredTypeEntity>): boolean;
|
79
|
+
ifProxiedTypeVariableThenProxyTag(entity: TypeVariableEntity): tags.Tag | undefined;
|
80
|
+
getProxyTypeVariable(proxiedVariable: TypeVariableEntity): TypeVariableEntity;
|
81
|
+
private tryGetEmitterPackage;
|
82
|
+
private createPackageByPackageMember;
|
83
|
+
private createRegisteredEntityNamesForCompilation;
|
84
|
+
}
|
85
|
+
export type ImportDirectivesCreationMode = ImportDirectivesCreationMode.OnlyJsLibrariesDependencies | ImportDirectivesCreationMode.AllDependencies;
|
86
|
+
export declare namespace ImportDirectivesCreationMode {
|
87
|
+
class OnlyJsLibrariesDependencies {
|
88
|
+
readonly kind = "only-js-libraries-dependencies";
|
89
|
+
}
|
90
|
+
class AllDependencies {
|
91
|
+
readonly package_: EmitterPackage;
|
92
|
+
readonly getArtelPackageImportPath: (p: EmitterPackage) => string;
|
93
|
+
readonly kind = "all-dependencies";
|
94
|
+
constructor(package_: EmitterPackage, getArtelPackageImportPath: (p: EmitterPackage) => string);
|
95
|
+
}
|
96
|
+
}
|
97
|
+
declare class Utils {
|
98
|
+
private readonly _ectx;
|
99
|
+
private _id;
|
100
|
+
constructor(_ectx: EmitterContext);
|
101
|
+
getOrderedCallArguments(callArguments: CallArguments): OrderedCallArguments;
|
102
|
+
orderCallArgumentsAccordingToParameters(callArguments: UnorderedCallArguments): OrderedCallArguments;
|
103
|
+
findOwnConstructorCall(body: BlockStatement): OwnConstructorCall | undefined;
|
104
|
+
findBaseConstructorCall(body: BlockStatement): BaseConstructorCall | undefined;
|
105
|
+
createUniqueLocalVariableEntity(locale: PackageLocale, type: types.Type): VariableEntity;
|
106
|
+
getBinaryExpressionOperatorFromAssignmentOperator(operator: AssignmentOperator): BinaryExpressionOperator;
|
107
|
+
generateId(): number;
|
108
|
+
createIdentitySubstitutedStructuredType(entity: StructuredTypeEntity): types.StructuredType;
|
109
|
+
createIdentitySubstitutedVariantType(entity: VariantTypeEntity): types.VariantType;
|
110
|
+
createInitializedTemporaryVariable(locale: PackageLocale, initializer: Expression, tempVariables?: VariableEntity[]): [VariableEntity, AssignmentExpression, VariableAccessExpression];
|
111
|
+
lowerOwnTypeVariableAccessExpression(expression: VariableAccessExpression): TypeVariableAccessExpression;
|
112
|
+
lowerOwnTypeMethodAccessExpression(expression: MethodAccessExpression): TypeMethodAccessExpression;
|
113
|
+
getPackageStructuredTypeRequired(originalName: string, packageEntity: PackageEntity): StructuredTypeEntity;
|
114
|
+
getPackageMethodRequired(originalName: string, packageEntity: PackageEntity): MethodEntity;
|
115
|
+
getTypeMethodRequired(originalName: string, type: TypeEntityWithMembers): TypeMethodEntity;
|
116
|
+
getTypeVariableRequired(originalName: string, type: TypeEntityWithMembers): TypeVariableEntity;
|
117
|
+
getTypeConstructorRequired(type: TypeEntityWithMembers): ConstructorEntity;
|
118
|
+
private createReceiverForOwnMemberAccess;
|
119
|
+
}
|
120
|
+
declare class Type {
|
121
|
+
private readonly _ectx;
|
122
|
+
private get standardTypes();
|
123
|
+
constructor(_ectx: EmitterContext);
|
124
|
+
ofExpression(expression: Expression): types.Type;
|
125
|
+
}
|
126
|
+
declare class GeneratedName {
|
127
|
+
ofMainFunction(locale: PackageLocale): string;
|
128
|
+
ofPackageConstructor(locale: PackageLocale, id: number): string;
|
129
|
+
ofPackageRunFunction(locale: PackageLocale, id: number): string;
|
130
|
+
ofPlainObjectConstructor(locale: PackageLocale, id: number): string;
|
131
|
+
ofExtensionConstructor(locale: PackageLocale): string;
|
132
|
+
ofExtensionMethodTargetParameter(locale: PackageLocale): string;
|
133
|
+
ofGlobalVariableGetter(locale: PackageLocale, originalName: string): string;
|
134
|
+
ofGlobalVariableSetter(locale: PackageLocale, originalName: string): string;
|
135
|
+
ofTypeVariableGetter(locale: PackageLocale, originalName: string): string;
|
136
|
+
ofTypeVariableSetter(locale: PackageLocale, originalName: string): string;
|
137
|
+
ofTypeIndexedElementGetter(locale: PackageLocale): string;
|
138
|
+
ofTypeIndexedElementSetter(locale: PackageLocale): string;
|
139
|
+
ofTypeDereferencedVariable(locale: PackageLocale): string;
|
140
|
+
ofTypeBackingVariable(locale: PackageLocale, originalName: string): string;
|
141
|
+
ofTempVariable(locale: PackageLocale, id: number): string;
|
142
|
+
ofDefaultImport(locale: PackageLocale, id: number): string;
|
143
|
+
ofNamespaceImport(locale: PackageLocale, id: number): string;
|
144
|
+
ofRefCountVariable(locale: PackageLocale): string;
|
145
|
+
ofAddReferenceMethod(locale: PackageLocale): string;
|
146
|
+
ofRemoveReferenceMethod(locale: PackageLocale): string;
|
147
|
+
ofShallowCopyMethod(locale: PackageLocale): string;
|
148
|
+
ofMergedConstructorIdParameter(locale: PackageLocale): string;
|
149
|
+
ofMergedConstructorParameter(locale: PackageLocale, id: number): string;
|
150
|
+
ofAnonymousType(locale: PackageLocale): string;
|
151
|
+
ofPlainObjectMethodNewThisVariable(locale: PackageLocale): string;
|
152
|
+
ofPlainObjectMethodResultNewThisProperty(locale: PackageLocale): string;
|
153
|
+
ofPlainObjectMethodResultResultProperty(locale: PackageLocale): string;
|
154
|
+
ofProxyVariable(locale: PackageLocale, originalName: string): string;
|
155
|
+
}
|
156
|
+
type OwnConstructorCall = {
|
157
|
+
expression: OwnConstructorCallExpression;
|
158
|
+
statementIndex: number;
|
159
|
+
};
|
160
|
+
type BaseConstructorCall = {
|
161
|
+
expression: BaseConstructorCallExpression;
|
162
|
+
statementIndex: number;
|
163
|
+
};
|
164
|
+
declare class ExtensionLikeMembers {
|
165
|
+
private readonly _ectx;
|
166
|
+
private readonly _methodSubstitutions;
|
167
|
+
private readonly _getterSubstitutions;
|
168
|
+
private readonly _setterSubstitutions;
|
169
|
+
private readonly _constructorSubstitutions;
|
170
|
+
constructor(_ectx: EmitterContext);
|
171
|
+
isExtensionLikeMethod(entity: TypeMethodEntity): ExtensionLikeMethodInfo | undefined;
|
172
|
+
isExtensionLikeConstructor(entity: ConstructorEntity): ExtensionLikeConstructorInfo | undefined;
|
173
|
+
isExtensionLikeVariable(entity: TypeVariableEntity): ExtensionLikeVariableInfo | undefined;
|
174
|
+
getMethodSubstitution(method: ExtensionLikeMethodInfo): TypeMethodEntity;
|
175
|
+
getConstructorSubstitution(constructor: ExtensionLikeConstructorInfo): TypeMethodEntity;
|
176
|
+
getVariableGetterSubstitution(variable: ExtensionLikeVariableInfo): TypeMethodEntity;
|
177
|
+
getVariableSetterSubstitution(variable: ExtensionLikeVariableInfo): TypeMethodEntity;
|
178
|
+
private ifContainerOfExtensionLikeMemberThenTargetType;
|
179
|
+
private createTargetParameter;
|
180
|
+
}
|
181
|
+
export declare class ExtensionLikeMethodInfo {
|
182
|
+
readonly entity: TypeMethodEntity;
|
183
|
+
readonly targetType: types.Type;
|
184
|
+
constructor(entity: TypeMethodEntity, targetType: types.Type);
|
185
|
+
}
|
186
|
+
export declare class ExtensionLikeConstructorInfo {
|
187
|
+
readonly entity: ConstructorEntity;
|
188
|
+
readonly targetType: types.Type;
|
189
|
+
constructor(entity: ConstructorEntity, targetType: types.Type);
|
190
|
+
}
|
191
|
+
export declare class ExtensionLikeVariableInfo {
|
192
|
+
readonly entity: TypeVariableEntity;
|
193
|
+
readonly targetType: types.Type;
|
194
|
+
constructor(entity: TypeVariableEntity, targetType: types.Type);
|
195
|
+
}
|
196
|
+
export declare class MembersForCopyOnWriteContext {
|
197
|
+
private readonly _ectx;
|
198
|
+
private readonly _membersForCopyOnWrite;
|
199
|
+
constructor(_ectx: EmitterContext);
|
200
|
+
ofType(entity: StructuredTypeEntity): MembersForCopyOnWrite;
|
201
|
+
private createReferenceCountField;
|
202
|
+
private createAddReferenceMethod;
|
203
|
+
private createRemoveReferenceMethod;
|
204
|
+
private createShallowCopyMethod;
|
205
|
+
private createIdentitySubstitutedType;
|
206
|
+
}
|
207
|
+
export declare class MembersForCopyOnWrite {
|
208
|
+
readonly referenceCountField: TypeVariableEntity;
|
209
|
+
readonly incrementReferenceCountMethod: TypeMethodEntity;
|
210
|
+
readonly decrementReferenceCountMethod: TypeMethodEntity;
|
211
|
+
readonly shallowCopyMethod: TypeMethodEntity;
|
212
|
+
constructor(referenceCountField: TypeVariableEntity, incrementReferenceCountMethod: TypeMethodEntity, decrementReferenceCountMethod: TypeMethodEntity, shallowCopyMethod: TypeMethodEntity);
|
213
|
+
}
|
214
|
+
export declare class OverloadedConstructorGroup {
|
215
|
+
private readonly _ectx;
|
216
|
+
readonly constructors: readonly ConstructorEntity[];
|
217
|
+
private readonly _containingType;
|
218
|
+
readonly mergedConstructor: ConstructorEntity;
|
219
|
+
constructor(_ectx: EmitterContext, constructors: readonly ConstructorEntity[], _containingType: TypeEntityWithMembers);
|
220
|
+
getOverloadId(constructor: ConstructorEntity): number;
|
221
|
+
private createMergedConstructor;
|
222
|
+
}
|
223
|
+
export declare class UniqueEntityNames {
|
224
|
+
private readonly _nameByEntity;
|
225
|
+
private readonly _uniqueNames;
|
226
|
+
get nameByEntity(): ReadonlyMap<Entity, string>;
|
227
|
+
constructor(uniqueNameByEntity?: ReadonlyMap<Entity, string>);
|
228
|
+
getName(entity: Entity): string;
|
229
|
+
registerEntity(entity: Entity, suggestedName: string): string;
|
230
|
+
registerEntity(entity: Entity, nameProvider: EntityNameProvider): string;
|
231
|
+
registerUniqueName(entity: Entity, uniqueName: string): void;
|
232
|
+
private generateUniqueName;
|
233
|
+
}
|
234
|
+
export declare class RealName {
|
235
|
+
private readonly _ectx;
|
236
|
+
static readonly RealNameArgumentName: string;
|
237
|
+
constructor(_ectx: EmitterContext);
|
238
|
+
ofEntity(entity: Entity): string | undefined;
|
239
|
+
private ofTypeMethod;
|
240
|
+
private ofTypeVariable;
|
241
|
+
ofMethod(entity: MethodEntity): string | undefined;
|
242
|
+
private getRealName;
|
243
|
+
private getLinkedTypeMethodOrPreserve;
|
244
|
+
private getLinkedTypeVariableOrPreserve;
|
245
|
+
}
|
246
|
+
export type NamedEntity = VariableEntity | VariantEntity | VariantTypeEntity | MethodEntity | TypeParameterEntity | MethodTypeEntity | StructuredTypeEntity | PackageAliasEntity | AliasTypeEntity;
|
247
|
+
declare class ExternalDeclarationLinker {
|
248
|
+
private readonly _ectx;
|
249
|
+
private readonly _targetPlatform;
|
250
|
+
constructor(_ectx: EmitterContext, _targetPlatform: PlatformKind);
|
251
|
+
link(sourceFile: SourceFile): void;
|
252
|
+
getLinkedVariable(variable: VariableEntity): VariableEntity | undefined;
|
253
|
+
getLinkedTypeVariable(variable: TypeVariableEntity): TypeVariableEntity | undefined;
|
254
|
+
getLinkedMethod(method: MethodEntity): MethodEntity | undefined;
|
255
|
+
getLinkedTypeMethod(method: TypeMethodEntity): TypeMethodEntity | undefined;
|
256
|
+
getLinkedIndexer(indexer: IndexerEntity): IndexerEntity | undefined;
|
257
|
+
getLinkedConstructor(constructor: ConstructorEntity): ConstructorEntity | undefined;
|
258
|
+
getLinkedTypeEntity(entity: TypeEntity): TypeEntity | undefined;
|
259
|
+
getLinkedType(type: types.Type): types.Type | undefined;
|
260
|
+
private linkVariableAccessExpression;
|
261
|
+
private linkInstanceVariableAccessExpression;
|
262
|
+
private linkMethodAccessExpression;
|
263
|
+
private linkInstanceMethodAccessExpression;
|
264
|
+
private linkAsExpression;
|
265
|
+
private linkIsExpression;
|
266
|
+
private linkIndexedAccessExpression;
|
267
|
+
private linkConstructorCallExpression;
|
268
|
+
private linkBaseConstructorCallExpression;
|
269
|
+
private linkTypeAccessExpression;
|
270
|
+
private linkPackageTypeDeclarationBaseType;
|
271
|
+
private entityShouldBeLinked;
|
272
|
+
private aspectEntityShouldBeLinked;
|
273
|
+
private typeShouldBeLinked;
|
274
|
+
}
|
275
|
+
declare class HelperMethods {
|
276
|
+
private readonly _ectx;
|
277
|
+
private readonly _integerDivisionMethod;
|
278
|
+
private readonly _numberIsIntegerMethod;
|
279
|
+
private readonly _throwErrorMethod;
|
280
|
+
constructor(_ectx: EmitterContext);
|
281
|
+
createIntegerDivisionMethodCall(dividend: Expression, divisor: Expression): Expression;
|
282
|
+
createNumberIsIntegerMethodCall(integer: Expression): Expression;
|
283
|
+
createThrowErrorMethodCall(argument?: Expression): Expression;
|
284
|
+
private createHelperMethodCall;
|
285
|
+
private findHelperMethodLazy;
|
286
|
+
}
|
287
|
+
declare class JsStandardTypes {
|
288
|
+
private readonly _ectx;
|
289
|
+
private readonly _numberType;
|
290
|
+
private readonly _integerType;
|
291
|
+
private readonly _textType;
|
292
|
+
private readonly _charType;
|
293
|
+
private readonly _yesNoType;
|
294
|
+
private readonly _noneType;
|
295
|
+
private readonly _methodType;
|
296
|
+
private readonly _referenceType;
|
297
|
+
private readonly _jsObject;
|
298
|
+
get number(): types.Type;
|
299
|
+
get integer(): types.Type;
|
300
|
+
get text(): types.Type;
|
301
|
+
get char(): types.Type;
|
302
|
+
get yesNo(): types.Type;
|
303
|
+
get none(): types.Type;
|
304
|
+
get method(): types.Type;
|
305
|
+
get reference(): types.Type;
|
306
|
+
get jsObject(): types.StructuredType;
|
307
|
+
constructor(ectx: EmitterContext);
|
308
|
+
private findStandardType;
|
309
|
+
private findJsType;
|
310
|
+
}
|
311
|
+
export declare class ReferencedPackageMemberEntities {
|
312
|
+
private readonly _packageByPackageMember;
|
313
|
+
private readonly _entitiesFromArtel;
|
314
|
+
private readonly _entitiesFromJs;
|
315
|
+
get entitiesFromArtel(): ReadonlyMap<EmitterPackage, ReadonlySet<Entity>>;
|
316
|
+
get entitiesFromJs(): ReadonlyMap<JavaScriptImplementationConfig, ReadonlySet<PackageMemberEntity>>;
|
317
|
+
constructor(_analyzer: Analyzer, node: ir.SourceFile, packageByPackageMember: ReadonlyMap<Entity, EmitterPackage>);
|
318
|
+
private addPackageMember;
|
319
|
+
private addEntityFromArtel;
|
320
|
+
private addEntityFromJs;
|
321
|
+
}
|
322
|
+
export declare class ReferencedEntityFromJs {
|
323
|
+
readonly value: NamedEntity;
|
324
|
+
readonly isDefaultImport: boolean;
|
325
|
+
constructor(value: NamedEntity, isDefaultImport: boolean);
|
326
|
+
}
|
327
|
+
export declare class EntitiesImportedFromJs {
|
328
|
+
readonly libraryName: string;
|
329
|
+
readonly values: Map<Entity, ReferencedEntityFromJs>;
|
330
|
+
constructor(libraryName: string, values: Map<Entity, ReferencedEntityFromJs>);
|
331
|
+
}
|
332
|
+
export declare class DummyPackageEntity implements PackageEntity {
|
333
|
+
readonly kind = EntityKind.Package;
|
334
|
+
getName(): PackageName;
|
335
|
+
getLocale(): PackageLocale;
|
336
|
+
getMembers(): OriginalPackageMembers;
|
337
|
+
isInterface(): InterfacePackageEntityInfo | undefined;
|
338
|
+
getImplementedInterfacePackage(): PackageEntity | undefined;
|
339
|
+
getSupportedPlatforms(): readonly PlatformKind[];
|
340
|
+
getDefinition(): PackageEntityDefinition;
|
341
|
+
}
|
342
|
+
export {};
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { PackageLocale } from '../common/index.js';
|
2
|
+
export declare const enum EmitterGeneratedDeclarationKind {
|
3
|
+
MainFunction = 0,
|
4
|
+
PackageConstructorPrefix = 1,
|
5
|
+
PackageRunFunctionPrefix = 2,
|
6
|
+
PlainObjectConstructorPrefix = 3,
|
7
|
+
ExtensionConstructor = 4,
|
8
|
+
ExtensionMethodTargetParameter = 5,
|
9
|
+
GlobalVariableGetterPrefix = 6,
|
10
|
+
GlobalVariableSetterPrefix = 7,
|
11
|
+
TypeVariableGetterPrefix = 8,
|
12
|
+
TypeVariableSetterPrefix = 9,
|
13
|
+
TypeIndexedElementGetter = 10,
|
14
|
+
TypeIndexedElementSetter = 11,
|
15
|
+
TypeDereferencedVariable = 12,
|
16
|
+
TypeBackingVariablePrefix = 13,
|
17
|
+
TempVariablePrefix = 14,
|
18
|
+
DefaultImportPrefix = 15,
|
19
|
+
NamespaceImportPrefix = 16,
|
20
|
+
RefCountVariable = 17,
|
21
|
+
AddReferenceMethod = 18,
|
22
|
+
RemoveReferenceMethod = 19,
|
23
|
+
ShallowCopyMethod = 20,
|
24
|
+
MergedConstructorIdParameter = 21,
|
25
|
+
MergedConstructorParameterPrefix = 22,
|
26
|
+
AnonymousType = 23,
|
27
|
+
PlainObjectMethodNewThisVariable = 24,
|
28
|
+
PlainObjectMethodResultNewThisProperty = 25,
|
29
|
+
PlainObjectMethodResultResultProperty = 26,
|
30
|
+
ProxyVariable = 27
|
31
|
+
}
|
32
|
+
export declare const emitterGeneratedDeclarationNamesByLocale: {
|
33
|
+
[T in PackageLocale]: {
|
34
|
+
[T in EmitterGeneratedDeclarationKind]: string;
|
35
|
+
};
|
36
|
+
};
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import { PackageLocale, Uri } from '../common/index.js';
|
2
|
+
import { ProgramPackage, SourcePackage } from '../project/index.js';
|
3
|
+
import { EmitterContext, UniqueEntityNames } from './EmitterContext.js';
|
4
|
+
import { RegisteredEntityNames } from './EntityNameProviders.js';
|
5
|
+
import * as ir from './ir/index.js';
|
6
|
+
export interface EmitterPackage {
|
7
|
+
getDefinition(): EmitterPackageDefinition;
|
8
|
+
getLoweredIr(): ir.SourceFile;
|
9
|
+
getMemberNames(): UniqueEntityNames;
|
10
|
+
getRegisteredEntityNames(): RegisteredEntityNames;
|
11
|
+
getPackageEntryPointMethods(): readonly ir.PackageMethodDeclaration[];
|
12
|
+
getPackageConstructorMethods(): readonly ir.PackageMethodDeclaration[];
|
13
|
+
getLocale(): PackageLocale;
|
14
|
+
}
|
15
|
+
export type EmitterPackageDefinition = EmitterPackageDefinition_source | EmitterPackageDefinition_intrinsic;
|
16
|
+
declare class EmitterPackageDefinition_source {
|
17
|
+
readonly pkg: SourcePackage;
|
18
|
+
readonly kind = "source";
|
19
|
+
constructor(pkg: SourcePackage);
|
20
|
+
}
|
21
|
+
declare class EmitterPackageDefinition_intrinsic {
|
22
|
+
readonly outputUri: Uri;
|
23
|
+
readonly isLaunch: boolean;
|
24
|
+
readonly kind = "intrinsic";
|
25
|
+
constructor(outputUri: Uri, isLaunch: boolean);
|
26
|
+
}
|
27
|
+
export declare class SourceEmitterPackage implements EmitterPackage {
|
28
|
+
private readonly _generalLoweringResult;
|
29
|
+
private readonly _memberNames;
|
30
|
+
private readonly _ectx;
|
31
|
+
private readonly _package;
|
32
|
+
constructor(ectx: EmitterContext, package_: ProgramPackage);
|
33
|
+
getDefinition(): EmitterPackageDefinition_source;
|
34
|
+
getLoweredIr(): ir.SourceFile;
|
35
|
+
getMemberNames(): UniqueEntityNames;
|
36
|
+
getRegisteredEntityNames(): RegisteredEntityNames;
|
37
|
+
getPackageConstructorMethods(): readonly ir.PackageMethodDeclaration[];
|
38
|
+
getPackageEntryPointMethods(): readonly ir.PackageMethodDeclaration[];
|
39
|
+
getLocale(): PackageLocale;
|
40
|
+
private getGeneralLoweringResult;
|
41
|
+
}
|
42
|
+
export declare class IntrinsicEmitterPackage implements EmitterPackage {
|
43
|
+
private readonly _outputUri;
|
44
|
+
private readonly _isLaunch;
|
45
|
+
private readonly _loweredIr;
|
46
|
+
private readonly _memberNames;
|
47
|
+
private readonly _registeredEntityNames;
|
48
|
+
private readonly _packageEntryPointMethods;
|
49
|
+
private readonly _packageConstructorMethods;
|
50
|
+
private readonly _locale;
|
51
|
+
constructor(_outputUri: Uri, _isLaunch: boolean, _loweredIr: ir.SourceFile, _memberNames: UniqueEntityNames, _registeredEntityNames: RegisteredEntityNames, _packageEntryPointMethods: readonly ir.PackageMethodDeclaration[], _packageConstructorMethods: readonly ir.PackageMethodDeclaration[], _locale: PackageLocale);
|
52
|
+
getDefinition(): EmitterPackageDefinition;
|
53
|
+
getLoweredIr(): ir.SourceFile;
|
54
|
+
getMemberNames(): UniqueEntityNames;
|
55
|
+
getRegisteredEntityNames(): RegisteredEntityNames;
|
56
|
+
getPackageEntryPointMethods(): readonly ir.PackageMethodDeclaration[];
|
57
|
+
getPackageConstructorMethods(): readonly ir.PackageMethodDeclaration[];
|
58
|
+
getLocale(): PackageLocale;
|
59
|
+
}
|
60
|
+
export {};
|
@@ -0,0 +1,33 @@
|
|
1
|
+
import { Name } from '../common/index.js';
|
2
|
+
import { Entity, EntityNaming } from '../entities/index.js';
|
3
|
+
import { EmitterContext } from './EmitterContext.js';
|
4
|
+
export interface EntityNameProvider extends OptionalEntityNameProvider {
|
5
|
+
getName(entity: Entity): string;
|
6
|
+
}
|
7
|
+
export interface OptionalEntityNameProvider {
|
8
|
+
getName(entity: Entity): string | undefined;
|
9
|
+
}
|
10
|
+
export declare class RegisteredEntityNames implements OptionalEntityNameProvider {
|
11
|
+
private readonly _registeredEntityNames;
|
12
|
+
get registeredEntityNames(): ReadonlyMap<Entity, string>;
|
13
|
+
registerName(entity: Entity, name: string): void;
|
14
|
+
registerNames(names: ReadonlyMap<Entity, string>): void;
|
15
|
+
getName(entity: Entity): string | undefined;
|
16
|
+
}
|
17
|
+
export declare class RealJsNameProvider implements OptionalEntityNameProvider {
|
18
|
+
private readonly _ectx;
|
19
|
+
constructor(_ectx: EmitterContext);
|
20
|
+
getName(entity: Entity): string | undefined;
|
21
|
+
}
|
22
|
+
export declare class EntityNameProviderChain implements EntityNameProvider {
|
23
|
+
private readonly _optionalProviders;
|
24
|
+
private readonly _requiredProvider;
|
25
|
+
constructor(_optionalProviders: readonly OptionalEntityNameProvider[], _requiredProvider: EntityNameProvider);
|
26
|
+
getName(entity: Entity): string;
|
27
|
+
}
|
28
|
+
export declare class NormalizedEntityNameProvider implements EntityNameProvider {
|
29
|
+
static getName(entity: Entity): string;
|
30
|
+
getName(entity: Entity): string;
|
31
|
+
}
|
32
|
+
export declare function getEntityNameRequired(entity: Entity): Name;
|
33
|
+
export declare function getEntityNaming(entity: Entity): EntityNaming;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { VariableEntity } from '../entities/index.js';
|
2
|
+
import { TransformationContinuationAction } from './TransformationContinuationAction.js';
|
3
|
+
import { Expression } from './ir/index.js';
|
4
|
+
export declare enum Kind {
|
5
|
+
Preserve = 0,
|
6
|
+
Replace = 1
|
7
|
+
}
|
8
|
+
export type Type = {
|
9
|
+
kind: Kind.Preserve;
|
10
|
+
action: TransformationContinuationAction;
|
11
|
+
} | {
|
12
|
+
kind: Kind.Replace;
|
13
|
+
expression: Expression;
|
14
|
+
hoistedLocalVariables?: readonly VariableEntity[];
|
15
|
+
};
|
16
|
+
export declare function preserve(action?: TransformationContinuationAction): Type;
|
17
|
+
export declare function replace(expression: Expression, hoistedLocalVariables?: readonly VariableEntity[]): Type;
|
@@ -0,0 +1,72 @@
|
|
1
|
+
import { PackageLocale } from '../common/index.js';
|
2
|
+
import { EmitterContext } from './EmitterContext.js';
|
3
|
+
import { RegisteredEntityNames } from './EntityNameProviders.js';
|
4
|
+
import { PackageMethodDeclaration, SourceFile } from './ir/index.js';
|
5
|
+
export declare class GeneralLowering {
|
6
|
+
private readonly _ectx;
|
7
|
+
static readonly toStringArtelMethodName = "\u0432-\u0442\u0435\u043A\u0441\u0442";
|
8
|
+
private readonly _ctx;
|
9
|
+
private readonly _referenceExpressionLowering;
|
10
|
+
private readonly _extensionLikeMembersLowering;
|
11
|
+
private readonly _copyOnWriteLowering;
|
12
|
+
private readonly _modifyingMethodLowering;
|
13
|
+
private readonly _methodObjectLowering;
|
14
|
+
private readonly _textTemplateLowering;
|
15
|
+
private readonly _isExpressionLowering;
|
16
|
+
private readonly _enumerableLowering;
|
17
|
+
private readonly _overloadedConstructorsLowering;
|
18
|
+
private readonly _indexerSetAccessLowering;
|
19
|
+
private readonly _variableProxyLowering;
|
20
|
+
private readonly _packageEntryPointMethods;
|
21
|
+
private readonly _packageConstructorMethods;
|
22
|
+
private readonly _registeredEntityNames;
|
23
|
+
private readonly _lazyInlineJsMethod;
|
24
|
+
private get inlineJsMethod();
|
25
|
+
constructor(_ectx: EmitterContext, locale: PackageLocale);
|
26
|
+
lower(sourceFile: SourceFile): GeneralLoweringResult;
|
27
|
+
private excludeRedefinableMethodsFromAliasType;
|
28
|
+
private substituteBaseAliasType;
|
29
|
+
private lowerImplicitVariantAccessExpression;
|
30
|
+
private lowerImplicitConversionExpression;
|
31
|
+
private addRedefinableMethodsToPrototype;
|
32
|
+
private lowerMethodTypeInvokeMethodCall;
|
33
|
+
private lowerParamObjectMemberAccessExpression;
|
34
|
+
private removeObjectFromBaseTypes;
|
35
|
+
private removeUnnecessaryBaseConstructorCalls;
|
36
|
+
private registerUniqueRuntimeNamesForPackageMemberDeclarations;
|
37
|
+
private lowerAssignmentWithIntegerDivision;
|
38
|
+
private lowerBinaryExpressionWithIntegerDivision;
|
39
|
+
private moveInstanceFieldInitializationsToConstructor;
|
40
|
+
private extractStaticFieldInitializations;
|
41
|
+
private orderPackageMemberDeclarations;
|
42
|
+
private lowerInlineJsMethodCall;
|
43
|
+
private lowerBaseConstructorCall;
|
44
|
+
private lowerBlockStatementWithClauses;
|
45
|
+
private lowerRunStatementWithClauses;
|
46
|
+
private lowerNumericVariantVariants;
|
47
|
+
private lowerForStatementWithIndexVariable;
|
48
|
+
private lowerIndexerGetAccessExpression;
|
49
|
+
private lowerIndexerSetAccess;
|
50
|
+
private lowerJsIndexerGetAccessExpression;
|
51
|
+
private lowerJsIndexerSetAccess;
|
52
|
+
private lowerPackageVariableSetAccessExpression;
|
53
|
+
private lowerPackageVariableGetAccessExpression;
|
54
|
+
private lowerStructuredTypeIndexerDeclaration;
|
55
|
+
private lowerPackageEntryPointDeclaration;
|
56
|
+
private lowerPackageConstructorDeclaration;
|
57
|
+
private lowerComputedPackageVariableDeclaration;
|
58
|
+
private lowerPackageVariableGetterDeclaration;
|
59
|
+
private lowerPackageVariableSetterDeclaration;
|
60
|
+
private lowerSubprogramBody;
|
61
|
+
private lowerComputedTypeVariableDeclaration;
|
62
|
+
private registerRuntimeNamesForTypeMethods;
|
63
|
+
private registerRuntimeNamesForNestedMethodsOfBlockStatement;
|
64
|
+
private lowerTypeDereferenceOperatorDeclaration;
|
65
|
+
}
|
66
|
+
export declare class GeneralLoweringResult {
|
67
|
+
readonly sourceFile: SourceFile;
|
68
|
+
readonly registeredEntityNames: RegisteredEntityNames;
|
69
|
+
readonly packageEntryPointMethods: readonly PackageMethodDeclaration[];
|
70
|
+
readonly packageConstructorMethods: readonly PackageMethodDeclaration[];
|
71
|
+
constructor(sourceFile: SourceFile, registeredEntityNames: RegisteredEntityNames, packageEntryPointMethods: readonly PackageMethodDeclaration[], packageConstructorMethods: readonly PackageMethodDeclaration[]);
|
72
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export * as blockStatementTransformationResult from './BlockStatementTransformationResult.js';
|
2
|
+
export * from './EmitterPackage.js';
|
3
|
+
export * as expressionTransformationResult from './ExpressionTransformationResult.js';
|
4
|
+
export * from './IrBuilder.js';
|
5
|
+
export * as packageMemberDeclarationTransformationResult from './PackageMemberDeclarationTransformationResult.js';
|
6
|
+
export * as simpleTransformationResult from './SimpleTransformationResult.js';
|
7
|
+
export * as statementTransformationResult from './StatementTransformationResult.js';
|
8
|
+
export * as typeMemberDeclarationTransformationResult from './StructuredTypeMemberDeclarationTransformationResult.js';
|
9
|
+
export * from './Transformer.js';
|
10
|
+
export * as typeAccessExpressionTransformationResult from './TypeAccessExpressionTransformationResult.js';
|