@artel/artc 0.6.25282 → 0.6.25284
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Cli.js +3 -3
- package/build/api/Api.js +28 -20
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +1836 -1590
- package/build/{chunk-VVFLEWSA.js → chunk-CGOSDN2E.js} +18023 -15286
- package/build/{chunk-DURHSZYF.js → chunk-OBX375YX.js} +1 -1
- package/build/{chunk-3DN3M64Y.js → chunk-ZV3UW5X6.js} +2 -2
- package/build/types/analysis/AccessibilityCheck.d.ts +20 -0
- package/build/types/analysis/Analyzer.d.ts +53 -78
- package/build/types/analysis/BaseMemberConflictsValidator.d.ts +2 -4
- package/build/types/analysis/ConstructorCallResolver.d.ts +3 -4
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +2 -1
- package/build/types/analysis/ModifierValidator.d.ts +17 -15
- package/build/types/analysis/NodeTypeUtils.d.ts +3 -3
- package/build/types/analysis/PackageMemberLookup.d.ts +11 -4
- package/build/types/analysis/ReachabilityChecker.d.ts +27 -0
- package/build/types/analysis/ReductionSourceMemberFinder.d.ts +20 -0
- package/build/types/analysis/ReservedNameDictionary.d.ts +14 -0
- package/build/types/analysis/ResolvedImplementationPackage.d.ts +48 -0
- package/build/types/analysis/SourceFileAnalyzer.d.ts +3 -0
- package/build/types/analysis/TypeArgumentInferrer.d.ts +1 -0
- package/build/types/analysis/TypeMemberLookup.d.ts +36 -22
- package/build/types/analysis/Utils.d.ts +2 -0
- package/build/types/analysis/WellKnownDeclarations.d.ts +11 -7
- package/build/types/analysis/control-flow/GraphBuilder.d.ts +4 -1
- package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +6 -5
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +8 -7
- package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +4 -5
- package/build/types/analysis/semantic-context/SemanticContextWithParent.d.ts +2 -0
- package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +11 -6
- package/build/types/analysis/semantic-context/SubprogramBodyAndParametersSemanticContext.d.ts +5 -5
- package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +4 -5
- package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +18 -15
- package/build/types/api/Api.d.ts +1 -1
- package/build/types/common/HelperPhrases.d.ts +2 -1
- package/build/types/common/LocalizationHelper.d.ts +8 -6
- package/build/types/common/index.d.ts +0 -1
- package/build/types/diagnostic/DiagnosticCode.d.ts +154 -131
- package/build/types/emitter/Entities.d.ts +5 -4
- package/build/types/emitter/EntityMap.d.ts +5 -1
- package/build/types/emitter/IrBuilder.d.ts +1 -0
- package/build/types/emitter/ir/Nodes.d.ts +11 -2
- package/build/types/entities/Entity.d.ts +9 -18
- package/build/types/entities/EntityHiding.d.ts +1 -4
- package/build/types/entities/EntityLocalizationContext.d.ts +3 -3
- package/build/types/entities/IEntity.d.ts +2 -1
- package/build/types/entities/OperatorKind.d.ts +6 -3
- package/build/types/entities/TypeEntity.d.ts +7 -6
- package/build/types/entities/index.d.ts +0 -2
- package/build/types/entities/interfaces/AliasTypeEntity.d.ts +1 -6
- package/build/types/entities/interfaces/ConstructorEntity.d.ts +3 -5
- package/build/types/entities/interfaces/DereferenceOperatorEntity.d.ts +2 -5
- package/build/types/entities/interfaces/DestructorEntity.d.ts +4 -5
- package/build/types/entities/interfaces/FunctionEntity.d.ts +3 -8
- package/build/types/entities/interfaces/FunctionTypeEntity.d.ts +0 -8
- package/build/types/entities/interfaces/GetterEntity.d.ts +0 -4
- package/build/types/entities/interfaces/IndexerEntity.d.ts +2 -5
- package/build/types/entities/interfaces/OperatorEntity.d.ts +3 -5
- package/build/types/entities/interfaces/PackageAliasEntity.d.ts +0 -5
- package/build/types/entities/interfaces/PackageEntity.d.ts +1 -9
- package/build/types/entities/interfaces/ReducedTypeEntity.d.ts +99 -0
- package/build/types/entities/interfaces/SetterEntity.d.ts +0 -4
- package/build/types/entities/interfaces/StructuredTypeEntity.d.ts +0 -8
- package/build/types/entities/interfaces/TextTranslationEntity.d.ts +1 -0
- package/build/types/entities/interfaces/TypeExtensionEntity.d.ts +1 -7
- package/build/types/entities/interfaces/TypeParameterEntity.d.ts +2 -4
- package/build/types/entities/interfaces/VariableEntity.d.ts +2 -11
- package/build/types/entities/interfaces/VariantTypeEntity.d.ts +1 -8
- package/build/types/entities/interfaces/index.d.ts +1 -0
- package/build/types/entities/intrinsic/IntrinsicConstructorEntity.d.ts +3 -1
- package/build/types/entities/intrinsic/IntrinsicFunctionEntity.d.ts +2 -1
- package/build/types/entities/intrinsic/IntrinsicFunctionTypeEntity.d.ts +3 -3
- package/build/types/entities/intrinsic/IntrinsicStructuredTypeEntity.d.ts +3 -3
- package/build/types/entities/intrinsic/IntrinsicTypeParameterEntity.d.ts +2 -4
- package/build/types/entities/intrinsic/IntrinsicVariableEntity.d.ts +2 -1
- package/build/types/entities/source/SourceAliasTypeEntity.d.ts +1 -2
- package/build/types/entities/source/SourceConstructorEntity.d.ts +6 -2
- package/build/types/entities/source/SourceDereferenceOperatorEntity.d.ts +3 -1
- package/build/types/entities/source/SourceDestructorEntity.d.ts +6 -1
- package/build/types/entities/source/SourceFunctionEntity.d.ts +5 -1
- package/build/types/entities/source/SourceFunctionTypeEntity.d.ts +1 -3
- package/build/types/entities/source/SourceIndexerEntity.d.ts +3 -1
- package/build/types/entities/source/SourceOperatorEntity.d.ts +5 -1
- package/build/types/entities/source/SourceReducedTypeEntity.d.ts +44 -0
- package/build/types/entities/source/SourceStructuredTypeEntity.d.ts +1 -3
- package/build/types/entities/source/SourceTextTranslationEntity.d.ts +1 -0
- package/build/types/entities/source/SourceTypeExtensionEntity.d.ts +1 -2
- package/build/types/entities/source/SourceTypeParameterEntity.d.ts +1 -2
- package/build/types/entities/source/SourceVariableEntity.d.ts +7 -1
- package/build/types/entities/source/SourceVariantTypeEntity.d.ts +1 -3
- package/build/types/entities/source/index.d.ts +1 -0
- package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +1 -3
- package/build/types/entities/translated/TranslatedConstructorEntity.d.ts +9 -4
- package/build/types/entities/translated/TranslatedDereferenceOperatorEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedDestructorEntity.d.ts +4 -1
- package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +1 -5
- package/build/types/entities/translated/TranslatedIndexerEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedOperatorEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedReducedTypeEntity.d.ts +59 -0
- package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +1 -5
- package/build/types/entities/translated/TranslatedTypeExtensionEntity.d.ts +1 -3
- package/build/types/entities/translated/TranslatedTypeParameterEntity.d.ts +1 -3
- package/build/types/entities/translated/TranslatedVariableEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +1 -5
- package/build/types/entities/translated/index.d.ts +1 -0
- package/build/types/parser/KeywordDictionary.d.ts +10 -2
- package/build/types/parser/TokenKind.d.ts +46 -44
- package/build/types/project/SourceFile.d.ts +3 -1
- package/build/types/services/CompletionService.d.ts +5 -4
- package/build/types/services/CustomRequests.d.ts +17 -6
- package/build/types/services/DisplayService.d.ts +78 -3
- package/build/types/services/LanguageServer.d.ts +3 -4
- package/build/types/services/ScriptEditingService.d.ts +25 -0
- package/build/types/services/TranslationService.d.ts +1 -1
- package/build/types/services/Types.d.ts +6 -0
- package/build/types/services/source-generation/EntityToSyntax.d.ts +16 -0
- package/build/types/tree/BaseNode.d.ts +56 -2
- package/build/types/tree/KeywordFlags.d.ts +28 -0
- package/build/types/tree/KeywordKind.d.ts +57 -54
- package/build/types/tree/NodeKind.d.ts +142 -140
- package/build/types/tree/Nodes.d.ts +55 -29
- package/build/types/tree/NodesDebug.d.ts +9 -0
- package/build/types/tree/OperatorKind.d.ts +6 -3
- package/build/types/tree/SyntaxFactory.d.ts +33 -29
- package/build/types/tree/SyntaxToCode.d.ts +4 -0
- package/build/types/tree/TokenFlags.d.ts +15 -0
- package/build/types/tree/TokenKind.d.ts +58 -44
- package/build/types/tree/Utils.d.ts +2 -2
- package/build/types/tree/index.d.ts +2 -1
- package/build/types/ts-interop/Entities.d.ts +11 -12
- package/build/types/ts-interop/TsInteropContext.d.ts +1 -2
- package/build/types/ts-interop/TsPackageMembersCreator.d.ts +1 -1
- package/build/types/types/AliasType.d.ts +0 -1
- package/build/types/types/FunctionType.d.ts +0 -1
- package/build/types/types/IntersectionType.d.ts +0 -1
- package/build/types/types/ParameterType.d.ts +0 -1
- package/build/types/types/ReducedType.d.ts +24 -0
- package/build/types/types/StructuredType.d.ts +1 -2
- package/build/types/types/SubstitutionStubType.d.ts +21 -0
- package/build/types/types/Type.d.ts +5 -3
- package/build/types/types/TypeFactory.d.ts +4 -2
- package/build/types/types/UnionType.d.ts +0 -1
- package/build/types/types/UnresolvedType.d.ts +0 -1
- package/build/types/types/VariantType.d.ts +0 -1
- package/build/types/types/index.d.ts +3 -1
- package/package.json +1 -1
- package/build/types/analysis/semantic-context/SemanticContextBasedEntityHidingMatcher.d.ts +0 -14
- package/build/types/entities/BaseEntityHidingMatcher.d.ts +0 -11
- package/build/types/entities/EntityHidingMatcherWithinTypeEntity.d.ts +0 -10
- package/build/types/parser/ReservedIdentifierDictionary.d.ts +0 -11
- package/build/types/services/AddBlockToScriptService.d.ts +0 -17
- package/build/types/services/AssignFieldService.d.ts +0 -10
- package/build/types/services/DeleteBlockFromScriptService.d.ts +0 -6
- package/build/types/tree/Token.d.ts +0 -58
- /package/build/types/services/{ProjectItemsService.d.ts → WorkspaceItemsService.d.ts} +0 -0
|
@@ -59,8 +59,10 @@ export declare class DisplayService {
|
|
|
59
59
|
private displayFunctionTypeUsage;
|
|
60
60
|
private displayParameterTypeUsage;
|
|
61
61
|
private displayAliasTypeUsage;
|
|
62
|
+
private displayReducedTypeUsage;
|
|
62
63
|
private displayUnionOrIntersectionTypeUsage;
|
|
63
64
|
private displayUnresolvedTypeUsage;
|
|
65
|
+
private displaySubstitutionStubTypeUsage;
|
|
64
66
|
private displayTypeInternal;
|
|
65
67
|
private displayTypeUsageInternal;
|
|
66
68
|
private displayUnionOrIntersectionTypeTypes;
|
|
@@ -320,7 +322,7 @@ export declare class TypeParameterValue_typeArgument {
|
|
|
320
322
|
readonly kind = "type-argument";
|
|
321
323
|
constructor(value: types.Type);
|
|
322
324
|
}
|
|
323
|
-
export type TypeDeclaration = TypeDeclaration_structured | TypeDeclaration_function | TypeDeclaration_variant | TypeDeclaration_alias | TypeDeclaration_parameter | TypeDeclaration_unresolved;
|
|
325
|
+
export type TypeDeclaration = TypeDeclaration_structured | TypeDeclaration_function | TypeDeclaration_variant | TypeDeclaration_alias | TypeDeclaration_reduced | TypeDeclaration_parameter | TypeDeclaration_unresolved;
|
|
324
326
|
export declare class TypeDeclaration_structured implements ITypeDeclaration {
|
|
325
327
|
readonly value: TypeDeclarationStructured;
|
|
326
328
|
readonly kind = "structured";
|
|
@@ -456,6 +458,39 @@ interface ITypeDeclarationAlias {
|
|
|
456
458
|
getAliasedType(): types.Type;
|
|
457
459
|
getContainer(): DeclarationContainer | undefined;
|
|
458
460
|
}
|
|
461
|
+
export declare class TypeDeclaration_reduced implements ITypeDeclaration {
|
|
462
|
+
readonly value: TypeDeclarationReduced;
|
|
463
|
+
readonly kind = "reduced";
|
|
464
|
+
constructor(value: TypeDeclarationReduced);
|
|
465
|
+
ifNamedThenEntity(): e.NamedTypeEntity | undefined;
|
|
466
|
+
getTypeParameterValues(): readonly TypeParameterValue[];
|
|
467
|
+
getContainer(): DeclarationContainer | undefined;
|
|
468
|
+
}
|
|
469
|
+
export type TypeDeclarationReduced = TypeDeclarationReduced_entity | TypeDeclarationReduced_type;
|
|
470
|
+
export declare class TypeDeclarationReduced_entity implements ITypeDeclarationReduced {
|
|
471
|
+
readonly entity: e.ReducedTypeEntity;
|
|
472
|
+
readonly kind = "entity";
|
|
473
|
+
constructor(entity: e.ReducedTypeEntity);
|
|
474
|
+
ifNamedThenEntity(): e.NamedTypeEntity | undefined;
|
|
475
|
+
getTypeParameterValues(): readonly TypeParameterValue[];
|
|
476
|
+
getReductionSource(): types.Type;
|
|
477
|
+
getContainer(): DeclarationContainer | undefined;
|
|
478
|
+
}
|
|
479
|
+
export declare class TypeDeclarationReduced_type implements ITypeDeclarationReduced {
|
|
480
|
+
readonly type: types.ReducedType;
|
|
481
|
+
readonly kind = "type";
|
|
482
|
+
constructor(type: types.ReducedType);
|
|
483
|
+
ifNamedThenEntity(): e.NamedTypeEntity | undefined;
|
|
484
|
+
getTypeParameterValues(): readonly TypeParameterValue[];
|
|
485
|
+
getReductionSource(): types.Type;
|
|
486
|
+
getContainer(): DeclarationContainer | undefined;
|
|
487
|
+
}
|
|
488
|
+
interface ITypeDeclarationReduced {
|
|
489
|
+
ifNamedThenEntity(): e.NamedTypeEntity | undefined;
|
|
490
|
+
getTypeParameterValues(): readonly TypeParameterValue[];
|
|
491
|
+
getReductionSource(): types.Type;
|
|
492
|
+
getContainer(): DeclarationContainer | undefined;
|
|
493
|
+
}
|
|
459
494
|
export declare class TypeDeclaration_parameter implements ITypeDeclaration {
|
|
460
495
|
readonly entity: e.TypeParameterEntity;
|
|
461
496
|
readonly kind = "parameter";
|
|
@@ -475,7 +510,7 @@ interface ITypeDeclaration {
|
|
|
475
510
|
getTypeParameterValues(): readonly TypeParameterValue[];
|
|
476
511
|
getContainer(): DeclarationContainer | undefined;
|
|
477
512
|
}
|
|
478
|
-
type NamedType = NamedType_function | NamedType_structured | NamedType_typeParameter | NamedType_variant | NamedType_alias;
|
|
513
|
+
type NamedType = NamedType_function | NamedType_structured | NamedType_typeParameter | NamedType_variant | NamedType_alias | NamedType_reduced;
|
|
479
514
|
export declare class NamedType_function implements INamedType {
|
|
480
515
|
readonly value: e.PackageFunctionTypeEntity;
|
|
481
516
|
readonly kind = "function";
|
|
@@ -511,6 +546,13 @@ export declare class NamedType_alias implements INamedType {
|
|
|
511
546
|
getEntity(): e.NamedTypeEntity;
|
|
512
547
|
getTypeParameters(): readonly e.TypeParameterEntity[];
|
|
513
548
|
}
|
|
549
|
+
export declare class NamedType_reduced implements INamedType {
|
|
550
|
+
readonly value: e.ReducedTypeEntity;
|
|
551
|
+
readonly kind = "alias";
|
|
552
|
+
constructor(value: e.ReducedTypeEntity);
|
|
553
|
+
getEntity(): e.NamedTypeEntity;
|
|
554
|
+
getTypeParameters(): readonly e.TypeParameterEntity[];
|
|
555
|
+
}
|
|
514
556
|
interface INamedType {
|
|
515
557
|
getEntity(): e.NamedTypeEntity;
|
|
516
558
|
getTypeParameters(): readonly e.TypeParameterEntity[];
|
|
@@ -540,7 +582,7 @@ interface IOperatorDeclaration {
|
|
|
540
582
|
getReturnType(): types.Type;
|
|
541
583
|
getContainer(analyzer: Analyzer | undefined): DeclarationContainer | undefined;
|
|
542
584
|
}
|
|
543
|
-
export type TypeUsage = StructuredTypeUsage | VariantTypeUsage | FunctionTypeUsage | AliasTypeUsage | ParameterTypeUsage | UnionOrIntersectionTypeUsage | UnresolvedTypeUsage;
|
|
585
|
+
export type TypeUsage = StructuredTypeUsage | VariantTypeUsage | FunctionTypeUsage | AliasTypeUsage | ReducedTypeUsage | ParameterTypeUsage | UnionOrIntersectionTypeUsage | UnresolvedTypeUsage | SubstitutionStubTypeUsage;
|
|
544
586
|
export type StructuredTypeUsage = StructuredTypeUsage_type | StructuredTypeUsage_entity;
|
|
545
587
|
export declare class StructuredTypeUsage_type implements IStructuredTypeUsage {
|
|
546
588
|
readonly type: types.StructuredType;
|
|
@@ -645,6 +687,32 @@ interface IAliasTypeUsage {
|
|
|
645
687
|
getAliasedType(): types.Type;
|
|
646
688
|
getContainer(): DeclarationContainer | undefined;
|
|
647
689
|
}
|
|
690
|
+
export type ReducedTypeUsage = ReducedTypeUsage_type | ReducedTypeUsage_entity;
|
|
691
|
+
export declare class ReducedTypeUsage_type implements IReducedTypeUsage {
|
|
692
|
+
readonly type: types.ReducedType;
|
|
693
|
+
readonly kind = "reduced";
|
|
694
|
+
constructor(type: types.ReducedType);
|
|
695
|
+
getEntity(): e.NamedTypeEntity;
|
|
696
|
+
getTypeParameterValues(): readonly TypeParameterValue[];
|
|
697
|
+
getReductionSource(): types.Type;
|
|
698
|
+
getContainer(): DeclarationContainer | undefined;
|
|
699
|
+
}
|
|
700
|
+
export declare class ReducedTypeUsage_entity implements IReducedTypeUsage {
|
|
701
|
+
readonly entity: e.ReducedTypeEntity;
|
|
702
|
+
readonly kind = "reduced";
|
|
703
|
+
constructor(entity: e.ReducedTypeEntity);
|
|
704
|
+
getEntity(): e.NamedTypeEntity;
|
|
705
|
+
getTypeParameterValues(): readonly TypeParameterValue[];
|
|
706
|
+
getReductionSource(): types.Type;
|
|
707
|
+
getContainer(): DeclarationContainer | undefined;
|
|
708
|
+
}
|
|
709
|
+
interface IReducedTypeUsage {
|
|
710
|
+
readonly kind: 'reduced';
|
|
711
|
+
getEntity(): e.NamedTypeEntity;
|
|
712
|
+
getTypeParameterValues(): readonly TypeParameterValue[];
|
|
713
|
+
getReductionSource(): types.Type;
|
|
714
|
+
getContainer(): DeclarationContainer | undefined;
|
|
715
|
+
}
|
|
648
716
|
export type ParameterTypeUsage = ParameterTypeUsage_type | ParameterTypeUsage_entity;
|
|
649
717
|
export declare class ParameterTypeUsage_type implements IParameterTypeUsage {
|
|
650
718
|
readonly type: types.ParameterType;
|
|
@@ -678,6 +746,13 @@ type UnresolvedTypeUsage = UnresolvedTypeUsage_type;
|
|
|
678
746
|
declare class UnresolvedTypeUsage_type {
|
|
679
747
|
readonly kind = "unresolved";
|
|
680
748
|
}
|
|
749
|
+
type SubstitutionStubTypeUsage = SubstitutionStubTypeUsage_type;
|
|
750
|
+
declare class SubstitutionStubTypeUsage_type {
|
|
751
|
+
readonly type: types.SubstitutionStubType;
|
|
752
|
+
readonly kind = "substitution-stub";
|
|
753
|
+
constructor(type: types.SubstitutionStubType);
|
|
754
|
+
getIndex(): number;
|
|
755
|
+
}
|
|
681
756
|
type TypeMemberDeclarationContainer = DeclarationContainer.Type | DeclarationContainer.TypeExtension;
|
|
682
757
|
type DeclarationContainer = DeclarationContainer.Type | DeclarationContainer.TypeExtension | DeclarationContainer.Package;
|
|
683
758
|
declare namespace DeclarationContainer {
|
|
@@ -32,9 +32,7 @@ export declare class LanguageServer {
|
|
|
32
32
|
private readonly signatureHelpService;
|
|
33
33
|
private readonly fileSystemTreeDisplayService;
|
|
34
34
|
private readonly selectionRangeService;
|
|
35
|
-
private readonly
|
|
36
|
-
private readonly addBlockToScriptService;
|
|
37
|
-
private readonly deleteBlockFromScriptService;
|
|
35
|
+
private readonly scriptEditingService;
|
|
38
36
|
private readonly codeActionsService;
|
|
39
37
|
constructor(config: LanguageServerConfig);
|
|
40
38
|
start(): void;
|
|
@@ -62,7 +60,8 @@ export declare class LanguageServer {
|
|
|
62
60
|
private convertSourceFileItemKind;
|
|
63
61
|
private convertDiagnostic;
|
|
64
62
|
private onAssignField;
|
|
65
|
-
private
|
|
63
|
+
private onAddBlocksToScript;
|
|
64
|
+
private onCanDeleteBlocksFromScript;
|
|
66
65
|
private onDeleteBlocksFromScript;
|
|
67
66
|
private convertSourceFileEdit;
|
|
68
67
|
private convertSourceFileEditsToWorkspaceEdit;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Analyzer } from '../analysis/Analyzer.js';
|
|
2
|
+
import { SubprogramDeclarationOrLiteral } from '../analysis/NodeTypeUtils.js';
|
|
3
|
+
import { SourceFile } from '../project/index.js';
|
|
4
|
+
import { NodeLocation, SourceFileEdit } from './Types.js';
|
|
5
|
+
export declare class ScriptEditingService {
|
|
6
|
+
private static readonly indentationStep;
|
|
7
|
+
private static readonly elementParameterNameText;
|
|
8
|
+
private static readonly elementParameterName;
|
|
9
|
+
createEditWithFieldAssignment(analyzer: Analyzer, sourceFile: SourceFile, scriptDeclaration: SubprogramDeclarationOrLiteral, fieldName: string, value: string): SourceFileEdit | undefined;
|
|
10
|
+
createEditAddingBlocks(sourceFile: SourceFile, scriptDeclaration: SubprogramDeclarationOrLiteral, addedBlockInfos: readonly AddedScriptBlockInfo[]): SourceFileEdit | undefined;
|
|
11
|
+
canDeleteBlocks(outerScriptFunctionLocation: NodeLocation, scriptFunctionLocations: readonly NodeLocation[]): boolean;
|
|
12
|
+
createEditDeletingBlock(sourceFile: SourceFile, scriptDeclaration: SubprogramDeclarationOrLiteral): SourceFileEdit | undefined;
|
|
13
|
+
private findLastAssignmentToField;
|
|
14
|
+
private createScriptBlockText;
|
|
15
|
+
private detectNewLine;
|
|
16
|
+
}
|
|
17
|
+
export interface AddedScriptBlockInfo {
|
|
18
|
+
readonly name: string;
|
|
19
|
+
readonly key: string;
|
|
20
|
+
readonly areaIndex: string | undefined;
|
|
21
|
+
readonly elementProperties: {
|
|
22
|
+
readonly [T in string]: string;
|
|
23
|
+
};
|
|
24
|
+
readonly nestedBlocks: readonly AddedScriptBlockInfo[];
|
|
25
|
+
}
|
|
@@ -9,7 +9,7 @@ export declare class TranslationService {
|
|
|
9
9
|
clearTranslationCache(): void;
|
|
10
10
|
private translateIdentifier;
|
|
11
11
|
private translateKeywords;
|
|
12
|
-
private
|
|
12
|
+
private translateReservedName;
|
|
13
13
|
private createRangeMaps;
|
|
14
14
|
private getTranslationId;
|
|
15
15
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as ls from 'vscode-languageserver';
|
|
2
2
|
import { Range, Uri } from '../common/index.js';
|
|
3
3
|
import { SourceFile } from '../project/index.js';
|
|
4
|
+
import * as tree from '../tree/index.js';
|
|
4
5
|
export type RangeLocation = {
|
|
5
6
|
uri: Uri;
|
|
6
7
|
range: Range;
|
|
@@ -30,3 +31,8 @@ export declare class SourceFileEdit {
|
|
|
30
31
|
readonly text: string;
|
|
31
32
|
constructor(sourceFile: SourceFile, range: Range, text: string);
|
|
32
33
|
}
|
|
34
|
+
export declare class NodeLocation {
|
|
35
|
+
readonly sourceFile: SourceFile;
|
|
36
|
+
readonly path: tree.NodePath;
|
|
37
|
+
constructor(sourceFile: SourceFile, path: tree.NodePath);
|
|
38
|
+
}
|
|
@@ -10,20 +10,34 @@ export declare class EntityToSyntax {
|
|
|
10
10
|
private convertNamedPackageMember;
|
|
11
11
|
private convertPackageType;
|
|
12
12
|
private convertPackageVariable;
|
|
13
|
+
private convertPackageVariableModifiers;
|
|
13
14
|
private convertPackageFunction;
|
|
15
|
+
private convertPackageFunctionModifiers;
|
|
14
16
|
private convertPackageStructuredType;
|
|
17
|
+
private convertPackageStructuredTypeModifiers;
|
|
15
18
|
private convertPackageAliasType;
|
|
19
|
+
private convertPackageAliasTypeModifiers;
|
|
20
|
+
private convertPackageReducedType;
|
|
21
|
+
private convertPackageReducedTypeModifiers;
|
|
16
22
|
private convertPackageVariantType;
|
|
23
|
+
private convertPackageVariantTypeModifiers;
|
|
17
24
|
private convertPackageFunctionType;
|
|
25
|
+
private convertPackageFunctionTypeModifiers;
|
|
18
26
|
private convertTypeEntityMembers;
|
|
19
27
|
private convertField;
|
|
28
|
+
private convertFieldModifiers;
|
|
20
29
|
private convertMethod;
|
|
30
|
+
private convertMethodModifiers;
|
|
21
31
|
private convertConstructor;
|
|
32
|
+
private convertConstructorModifiers;
|
|
22
33
|
private convertDestructor;
|
|
34
|
+
private convertDestructorModifiers;
|
|
23
35
|
private convertIndexer;
|
|
36
|
+
private convertIndexerModifiers;
|
|
24
37
|
private convertVariant;
|
|
25
38
|
private createStructuredTypeDeclarationBody;
|
|
26
39
|
private createAliasTypeDeclarationBody;
|
|
40
|
+
private createReducedTypeDeclarationBody;
|
|
27
41
|
private createVariantTypeDeclarationBody;
|
|
28
42
|
private createFunctionTypeDeclarationBody;
|
|
29
43
|
private convertTypeParameters;
|
|
@@ -38,9 +52,11 @@ export declare class EntityToSyntax {
|
|
|
38
52
|
private convertVariantType;
|
|
39
53
|
private convertFunctionType;
|
|
40
54
|
private convertAliasType;
|
|
55
|
+
private convertReducedType;
|
|
41
56
|
private convertParameterType;
|
|
42
57
|
private convertUnionType;
|
|
43
58
|
private convertIntersectionType;
|
|
44
59
|
private convertUnresolvedType;
|
|
60
|
+
private convertSubstitutionStubType;
|
|
45
61
|
private createNamedTypeSpecifier;
|
|
46
62
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { PackageDialect, PackageLocale, Range } from '../common/index.js';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { NodeKind } from './NodeKind.js';
|
|
3
|
+
import { TokenKind } from './TokenKind.js';
|
|
4
|
+
import { TriviaKind } from './TriviaKind.js';
|
|
5
|
+
import { OperatorKind } from './OperatorKind.js';
|
|
6
|
+
import { KeywordKind } from './KeywordKind.js';
|
|
7
|
+
import { TokenFlags } from './TokenFlags.js';
|
|
8
|
+
import { KeywordFlags } from './KeywordFlags.js';
|
|
9
|
+
import { Node, Identifier, SourceFile } from './Nodes.js';
|
|
4
10
|
export declare abstract class BaseNode {
|
|
5
11
|
protected static readonly emptyChildren_: [];
|
|
6
12
|
abstract readonly children: readonly (Node | undefined)[];
|
|
@@ -38,4 +44,52 @@ export declare abstract class BaseNode {
|
|
|
38
44
|
private countDescendants;
|
|
39
45
|
private countTokens;
|
|
40
46
|
}
|
|
47
|
+
export declare class Token<TKind extends TokenKind = TokenKind> extends BaseNode {
|
|
48
|
+
readonly kind = NodeKind.Token;
|
|
49
|
+
readonly tokenKind: TKind;
|
|
50
|
+
readonly value: string;
|
|
51
|
+
readonly leadingTrivia: readonly Trivia[];
|
|
52
|
+
readonly trailingTrivia: readonly Trivia[];
|
|
53
|
+
readonly flags: TokenFlags;
|
|
54
|
+
readonly operatorKind: OperatorKind | undefined;
|
|
55
|
+
get children(): readonly [];
|
|
56
|
+
get parent(): Node;
|
|
57
|
+
get isMissing(): boolean;
|
|
58
|
+
protected get thisAsNode(): Node;
|
|
59
|
+
constructor(tokenKind: TKind, value: string, leadingTrivia: readonly Trivia[], trailingTrivia: readonly Trivia[], flags: TokenFlags, operatorKind: OperatorKind | undefined, rangeWithTrivia: Range | undefined);
|
|
60
|
+
get rangeWithoutTrivia(): Range;
|
|
61
|
+
getTextWithTrivia(): string;
|
|
62
|
+
hasTrailingLineBreak(): boolean;
|
|
63
|
+
getTriviaAt(position: number): TokenTrivia | undefined;
|
|
64
|
+
selectLeadingTrivia(condition: (trivia: Trivia, rangeStart: number, rangeEnd: number) => boolean): TokenTrivia[];
|
|
65
|
+
selectTrailingTrivia(condition: (trivia: Trivia, rangeStart: number, rangeEnd: number) => boolean): TokenTrivia[];
|
|
66
|
+
protected getLengthWithTrivia(): number;
|
|
67
|
+
}
|
|
68
|
+
export declare class Trivia {
|
|
69
|
+
readonly kind: TriviaKind;
|
|
70
|
+
readonly value: string;
|
|
71
|
+
get rangeLength(): number;
|
|
72
|
+
constructor(kind: TriviaKind, value: string);
|
|
73
|
+
}
|
|
74
|
+
export declare class TokenTrivia {
|
|
75
|
+
readonly trivia: Trivia;
|
|
76
|
+
readonly token: Token<TokenKind>;
|
|
77
|
+
readonly isTrailing: boolean;
|
|
78
|
+
readonly index: number;
|
|
79
|
+
readonly range: Range;
|
|
80
|
+
get kind(): TriviaKind;
|
|
81
|
+
get value(): string;
|
|
82
|
+
constructor(token: Token<TokenKind>, trivia: Trivia, isTrailing: boolean, index: number, range: Range);
|
|
83
|
+
}
|
|
84
|
+
export declare class Keyword<TKind extends KeywordKind = KeywordKind> extends BaseNode {
|
|
85
|
+
readonly kind = NodeKind.Keyword;
|
|
86
|
+
readonly children: readonly Identifier[];
|
|
87
|
+
readonly keywordKind: TKind;
|
|
88
|
+
readonly flags: KeywordFlags;
|
|
89
|
+
get parent(): Node;
|
|
90
|
+
get tokens(): readonly Identifier[];
|
|
91
|
+
get isMissing(): boolean;
|
|
92
|
+
protected get thisAsNode(): Node;
|
|
93
|
+
constructor(tokens: readonly Identifier[], keywordKind: TKind, flags: KeywordFlags | undefined, rangeWithTrivia: Range | undefined);
|
|
94
|
+
}
|
|
41
95
|
export declare function toSourceCode(node: Node, lengthLimit?: number, excludeTrivia?: boolean): string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const enum KeywordFlags {
|
|
2
|
+
None = 0,
|
|
3
|
+
Missing = 1,
|
|
4
|
+
Noun = 2,
|
|
5
|
+
Verb = 4,
|
|
6
|
+
Adjective = 8,
|
|
7
|
+
Adverb = 16,
|
|
8
|
+
Pronoun = 32,
|
|
9
|
+
Preposition = 64,
|
|
10
|
+
Particle = 128,
|
|
11
|
+
Conjunction = 256,
|
|
12
|
+
Numeral = 512,
|
|
13
|
+
MasculineGender = 1024,
|
|
14
|
+
FeminineGender = 2048,
|
|
15
|
+
NeuterGender = 4096,
|
|
16
|
+
Singular = 8192,
|
|
17
|
+
Plural = 16384,
|
|
18
|
+
NeuNoun = 4098,
|
|
19
|
+
PluralNoun = 16386,
|
|
20
|
+
SingularMasNoun = 9218,
|
|
21
|
+
SingularFemNoun = 10242,
|
|
22
|
+
SingularNeuNoun = 12290,
|
|
23
|
+
ComAdjective = 7176,
|
|
24
|
+
SingularMasAdjective = 9224,
|
|
25
|
+
SingularFemAdjective = 10248,
|
|
26
|
+
SingularNeuAdjective = 12296,
|
|
27
|
+
PluralAdjective = 16392
|
|
28
|
+
}
|
|
@@ -5,58 +5,61 @@ export declare enum KeywordKind {
|
|
|
5
5
|
Aspect = 3,
|
|
6
6
|
Object = 4,
|
|
7
7
|
PlainObject = 5,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
8
|
+
ReducedObject = 6,
|
|
9
|
+
Variant = 7,
|
|
10
|
+
Run = 8,
|
|
11
|
+
Try = 9,
|
|
12
|
+
From = 10,
|
|
13
|
+
Else = 11,
|
|
14
|
+
ElseIf = 12,
|
|
15
|
+
Function = 13,
|
|
16
|
+
If = 14,
|
|
17
|
+
Is = 15,
|
|
18
|
+
Return = 16,
|
|
19
|
+
Type = 17,
|
|
20
|
+
Basic = 18,
|
|
21
|
+
Import = 19,
|
|
22
|
+
Important = 20,
|
|
23
|
+
Error = 21,
|
|
24
|
+
Finally = 22,
|
|
25
|
+
And = 23,
|
|
26
|
+
Or = 24,
|
|
27
|
+
Xor = 25,
|
|
28
|
+
While = 26,
|
|
29
|
+
Loop = 27,
|
|
30
|
+
RepeatWhile = 28,
|
|
31
|
+
Yield = 29,
|
|
32
|
+
When = 30,
|
|
33
|
+
Cond = 31,
|
|
34
|
+
Creation = 32,
|
|
35
|
+
Catch = 33,
|
|
36
|
+
BreakLoop = 34,
|
|
37
|
+
ContinueLoop = 35,
|
|
38
|
+
For = 36,
|
|
39
|
+
Const = 37,
|
|
40
|
+
Hidden = 38,
|
|
41
|
+
Abstract = 39,
|
|
42
|
+
Override = 40,
|
|
43
|
+
Async = 41,
|
|
44
|
+
Static = 42,
|
|
45
|
+
As = 43,
|
|
46
|
+
Not = 44,
|
|
47
|
+
Switch = 45,
|
|
48
|
+
Case = 46,
|
|
49
|
+
Dispose = 47,
|
|
50
|
+
Destruction = 48,
|
|
51
|
+
InHierarchy = 49,
|
|
52
|
+
InFile = 50,
|
|
53
|
+
InPackage = 51,
|
|
54
|
+
InType = 52,
|
|
55
|
+
Yes = 53,
|
|
56
|
+
No = 54,
|
|
57
|
+
Reference = 55,
|
|
58
|
+
Translations = 56,
|
|
59
|
+
Base = 57,
|
|
60
|
+
Null = 58,
|
|
61
|
+
Get = 59,
|
|
62
|
+
Set = 60,
|
|
63
|
+
LoopWhile = 61,
|
|
64
|
+
Over = 62
|
|
62
65
|
}
|