@artel/artc 0.6.25282 → 0.6.25283

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 (99) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +4 -8
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +1091 -973
  5. package/build/{chunk-VVFLEWSA.js → chunk-2Q4QKW7T.js} +6998 -6268
  6. package/build/{chunk-3DN3M64Y.js → chunk-7RAZAZE6.js} +2 -2
  7. package/build/{chunk-DURHSZYF.js → chunk-MJ2ZVHII.js} +1 -1
  8. package/build/types/analysis/Analyzer.d.ts +41 -74
  9. package/build/types/analysis/ResolvedImplementationPackage.d.ts +48 -0
  10. package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +4 -5
  11. package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +4 -4
  12. package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +4 -5
  13. package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +4 -4
  14. package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +4 -5
  15. package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +8 -8
  16. package/build/types/common/HelperPhrases.d.ts +2 -1
  17. package/build/types/common/LocalizationHelper.d.ts +6 -4
  18. package/build/types/diagnostic/DiagnosticCode.d.ts +10 -0
  19. package/build/types/emitter/EntityMap.d.ts +1 -1
  20. package/build/types/emitter/ir/Nodes.d.ts +11 -2
  21. package/build/types/entities/Entity.d.ts +0 -12
  22. package/build/types/entities/EntityLocalizationContext.d.ts +1 -2
  23. package/build/types/entities/IEntity.d.ts +2 -1
  24. package/build/types/entities/OperatorKind.d.ts +6 -3
  25. package/build/types/entities/TypeEntity.d.ts +4 -4
  26. package/build/types/entities/interfaces/AliasTypeEntity.d.ts +3 -8
  27. package/build/types/entities/interfaces/ConstructorEntity.d.ts +0 -4
  28. package/build/types/entities/interfaces/DereferenceOperatorEntity.d.ts +0 -4
  29. package/build/types/entities/interfaces/DestructorEntity.d.ts +0 -4
  30. package/build/types/entities/interfaces/FunctionEntity.d.ts +1 -8
  31. package/build/types/entities/interfaces/FunctionTypeEntity.d.ts +0 -8
  32. package/build/types/entities/interfaces/GetterEntity.d.ts +0 -4
  33. package/build/types/entities/interfaces/IndexerEntity.d.ts +0 -4
  34. package/build/types/entities/interfaces/OperatorEntity.d.ts +0 -4
  35. package/build/types/entities/interfaces/PackageAliasEntity.d.ts +0 -5
  36. package/build/types/entities/interfaces/PackageEntity.d.ts +1 -9
  37. package/build/types/entities/interfaces/SetterEntity.d.ts +0 -4
  38. package/build/types/entities/interfaces/StructuredTypeEntity.d.ts +0 -8
  39. package/build/types/entities/interfaces/TextTranslationEntity.d.ts +1 -0
  40. package/build/types/entities/interfaces/TypeExtensionEntity.d.ts +1 -7
  41. package/build/types/entities/interfaces/TypeParameterEntity.d.ts +0 -2
  42. package/build/types/entities/interfaces/VariableEntity.d.ts +1 -11
  43. package/build/types/entities/interfaces/VariantTypeEntity.d.ts +1 -8
  44. package/build/types/entities/intrinsic/IntrinsicFunctionTypeEntity.d.ts +3 -3
  45. package/build/types/entities/intrinsic/IntrinsicStructuredTypeEntity.d.ts +3 -3
  46. package/build/types/entities/intrinsic/IntrinsicTypeParameterEntity.d.ts +2 -4
  47. package/build/types/entities/source/SourceAliasTypeEntity.d.ts +1 -2
  48. package/build/types/entities/source/SourceFunctionTypeEntity.d.ts +1 -3
  49. package/build/types/entities/source/SourceStructuredTypeEntity.d.ts +1 -3
  50. package/build/types/entities/source/SourceTextTranslationEntity.d.ts +1 -0
  51. package/build/types/entities/source/SourceTypeExtensionEntity.d.ts +1 -2
  52. package/build/types/entities/source/SourceTypeParameterEntity.d.ts +1 -2
  53. package/build/types/entities/source/SourceVariantTypeEntity.d.ts +1 -3
  54. package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +1 -3
  55. package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +1 -5
  56. package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +1 -5
  57. package/build/types/entities/translated/TranslatedTypeExtensionEntity.d.ts +1 -3
  58. package/build/types/entities/translated/TranslatedTypeParameterEntity.d.ts +1 -3
  59. package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +1 -5
  60. package/build/types/parser/KeywordDictionary.d.ts +10 -2
  61. package/build/types/parser/TokenKind.d.ts +46 -44
  62. package/build/types/services/CustomRequests.d.ts +17 -6
  63. package/build/types/services/DisplayService.d.ts +9 -1
  64. package/build/types/services/LanguageServer.d.ts +3 -4
  65. package/build/types/services/ScriptEditingService.d.ts +25 -0
  66. package/build/types/services/Types.d.ts +6 -0
  67. package/build/types/services/source-generation/EntityToSyntax.d.ts +12 -0
  68. package/build/types/tree/BaseNode.d.ts +56 -2
  69. package/build/types/tree/KeywordFlags.d.ts +28 -0
  70. package/build/types/tree/KeywordKind.d.ts +3 -1
  71. package/build/types/tree/Nodes.d.ts +4 -18
  72. package/build/types/tree/NodesDebug.d.ts +9 -0
  73. package/build/types/tree/OperatorKind.d.ts +6 -3
  74. package/build/types/tree/SyntaxFactory.d.ts +31 -29
  75. package/build/types/tree/SyntaxToCode.d.ts +3 -0
  76. package/build/types/tree/TokenFlags.d.ts +15 -0
  77. package/build/types/tree/TokenKind.d.ts +58 -44
  78. package/build/types/tree/Utils.d.ts +2 -2
  79. package/build/types/tree/index.d.ts +2 -1
  80. package/build/types/ts-interop/Entities.d.ts +1 -11
  81. package/build/types/ts-interop/TsInteropContext.d.ts +1 -2
  82. package/build/types/types/AliasType.d.ts +0 -1
  83. package/build/types/types/FunctionType.d.ts +0 -1
  84. package/build/types/types/IntersectionType.d.ts +0 -1
  85. package/build/types/types/ParameterType.d.ts +0 -1
  86. package/build/types/types/StructuredType.d.ts +1 -2
  87. package/build/types/types/SubstitutionStubType.d.ts +21 -0
  88. package/build/types/types/Type.d.ts +4 -3
  89. package/build/types/types/TypeFactory.d.ts +2 -1
  90. package/build/types/types/UnionType.d.ts +0 -1
  91. package/build/types/types/UnresolvedType.d.ts +0 -1
  92. package/build/types/types/VariantType.d.ts +0 -1
  93. package/build/types/types/index.d.ts +2 -1
  94. package/package.json +1 -1
  95. package/build/types/services/AddBlockToScriptService.d.ts +0 -17
  96. package/build/types/services/AssignFieldService.d.ts +0 -10
  97. package/build/types/services/DeleteBlockFromScriptService.d.ts +0 -6
  98. package/build/types/tree/Token.d.ts +0 -58
  99. /package/build/types/services/{ProjectItemsService.d.ts → WorkspaceItemsService.d.ts} +0 -0
@@ -6,7 +6,7 @@ import * as tree from '../../tree/index.js';
6
6
  import * as types from '../../types/index.js';
7
7
  import { EntityNaming } from '../EntityNaming.js';
8
8
  import { TypeEntityMembers } from '../TypeEntityMembers.js';
9
- import { AnonymousVariantTypeEntity, BaseObjectType, EntityContext, EntityHidingLevel, EntityKind, PackageEntity, PackageVariantTypeEntity, SubstitutionApplicationMode, TypeEntityKind, TypeParameterEntity, VariantTypeEntityDefinition } from '../index.js';
9
+ import { AnonymousVariantTypeEntity, BaseObjectType, EntityHidingLevel, EntityKind, PackageEntity, PackageVariantTypeEntity, SubstitutionApplicationMode, TypeEntityKind, TypeParameterEntity, VariantTypeEntityDefinition } from '../index.js';
10
10
  export declare class PackageVariantTypeDeclarationEntity implements PackageVariantTypeEntity {
11
11
  private readonly analyzer;
12
12
  private readonly node;
@@ -34,7 +34,6 @@ export declare class PackageVariantTypeDeclarationEntity implements PackageVaria
34
34
  getTags(): readonly Tag[];
35
35
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
36
36
  getBaseObjectType(): BaseObjectType;
37
- getContext(): EntityContext;
38
37
  getTranslation(): Translation | undefined;
39
38
  getLocale(): PackageLocale;
40
39
  getDialect(): PackageDialect;
@@ -61,7 +60,6 @@ export declare class AnonymousVariantTypeDeclarationEntity implements AnonymousV
61
60
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
62
61
  getContainingPackage(): PackageEntity;
63
62
  getBaseObjectType(): BaseObjectType;
64
- getContext(): EntityContext;
65
63
  getTranslation(): Translation | undefined;
66
64
  getLocale(): PackageLocale;
67
65
  getDialect(): PackageDialect;
@@ -6,7 +6,7 @@ import * as tree from '../../tree/index.js';
6
6
  import * as types from '../../types/index.js';
7
7
  import { EntityHidingLevel } from '../EntityHiding.js';
8
8
  import { EntityLocalizationContext } from '../EntityLocalizationContext.js';
9
- import { EntityContext, EntityKind } from '../index.js';
9
+ import { EntityKind } from '../index.js';
10
10
  import type { AliasTypeEntity, CycleFreeAliasedTypeResolutionResult } from '../interfaces/AliasTypeEntity.js';
11
11
  import { AliasedType, AliasTypeEntityDefinition } from '../interfaces/AliasTypeEntity.js';
12
12
  import { PackageEntity } from '../interfaces/PackageEntity.js';
@@ -26,7 +26,6 @@ export declare class TranslatedAliasTypeEntity implements AliasTypeEntity {
26
26
  private readonly typeParameters;
27
27
  private readonly aliasedType;
28
28
  private readonly members;
29
- private readonly context;
30
29
  constructor(originalEntity: AliasTypeEntity, translation: Translation, name: Name, translationPackage: AnalyzedTranslationPackage, node: tree.TypeTranslationDeclaration | undefined);
31
30
  getName(): Name;
32
31
  getContainingPackage(): PackageEntity;
@@ -42,7 +41,6 @@ export declare class TranslatedAliasTypeEntity implements AliasTypeEntity {
42
41
  isHidden(): EntityHidingLevel | undefined;
43
42
  getTags(): readonly Tag[];
44
43
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
45
- getContext(): EntityContext;
46
44
  }
47
45
  export declare class LocalizedAliasedType extends AliasedType {
48
46
  private readonly original;
@@ -7,7 +7,7 @@ import * as types from '../../types/Type.js';
7
7
  import { BaseObjectType } from '../BaseObjectType.js';
8
8
  import { EntityHidingLevel } from '../EntityHiding.js';
9
9
  import { EntityNaming } from '../EntityNaming.js';
10
- import { EntityContext, EntityKind } from '../index.js';
10
+ import { EntityKind } from '../index.js';
11
11
  import type { AnonymousFunctionTypeEntity, PackageFunctionTypeEntity } from '../interfaces/FunctionTypeEntity.js';
12
12
  import { FunctionTypeEntityDefinition } from '../interfaces/FunctionTypeEntity.js';
13
13
  import { PackageEntity } from '../interfaces/PackageEntity.js';
@@ -30,7 +30,6 @@ export declare class TranslatedPackageFunctionTypeEntity implements PackageFunct
30
30
  private readonly returnType;
31
31
  private readonly members;
32
32
  private readonly baseObjectType;
33
- private readonly context;
34
33
  constructor(originalEntity: PackageFunctionTypeEntity, translation: Translation, name: Name, translationPackage: AnalyzedTranslationPackage, node: tree.FunctionTypeTranslationDeclaration | undefined);
35
34
  getName(): Name;
36
35
  getContainingPackage(): PackageEntity;
@@ -50,7 +49,6 @@ export declare class TranslatedPackageFunctionTypeEntity implements PackageFunct
50
49
  getTags(): readonly Tag[];
51
50
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
52
51
  getBaseObjectType(): BaseObjectType;
53
- getContext(): EntityContext;
54
52
  }
55
53
  export declare class TranslatedAnonymousFunctionTypeEntity implements AnonymousFunctionTypeEntity {
56
54
  readonly kind = EntityKind.Type;
@@ -63,7 +61,6 @@ export declare class TranslatedAnonymousFunctionTypeEntity implements AnonymousF
63
61
  private readonly returnType;
64
62
  private readonly members;
65
63
  private readonly baseObjectType;
66
- private readonly context;
67
64
  constructor(originalEntity: AnonymousFunctionTypeEntity, translation: Translation, translationPackage: AnalyzedTranslationPackage);
68
65
  getContainingPackage(): PackageEntity;
69
66
  getTranslation(): Translation | undefined;
@@ -82,5 +79,4 @@ export declare class TranslatedAnonymousFunctionTypeEntity implements AnonymousF
82
79
  getTags(): readonly Tag[];
83
80
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
84
81
  getBaseObjectType(): BaseObjectType;
85
- getContext(): EntityContext;
86
82
  }
@@ -9,7 +9,7 @@ import { BaseObjectType, CycleFreeBaseObjectTypeResolutionResult } from '../Base
9
9
  import { EntityHidingLevel } from '../EntityHiding.js';
10
10
  import { EntityLocalizationContext } from '../EntityLocalizationContext.js';
11
11
  import { EntityNaming } from '../EntityNaming.js';
12
- import { EntityContext, EntityKind } from '../index.js';
12
+ import { EntityKind } from '../index.js';
13
13
  import { PackageEntity } from '../interfaces/PackageEntity.js';
14
14
  import type { AnonymousStructuredTypeEntity, PackageStructuredTypeEntity, StructuredTypeEntityDefinition, StructuredTypeKind } from '../interfaces/StructuredTypeEntity.js';
15
15
  import { TypeParameterEntity } from '../interfaces/TypeParameterEntity.js';
@@ -29,7 +29,6 @@ export declare class TranslatedPackageStructuredTypeEntity implements PackageStr
29
29
  private readonly members;
30
30
  private readonly baseObjectType;
31
31
  private readonly baseAspectTypes;
32
- private readonly context;
33
32
  constructor(originalEntity: PackageStructuredTypeEntity, translation: Translation, name: Name, translationPackage: AnalyzedTranslationPackage, node: tree.TypeTranslationDeclaration | undefined);
34
33
  getName(): Name;
35
34
  getContainingPackage(): PackageEntity;
@@ -50,7 +49,6 @@ export declare class TranslatedPackageStructuredTypeEntity implements PackageStr
50
49
  isHidden(): EntityHidingLevel | undefined;
51
50
  getTags(): readonly Tag[];
52
51
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
53
- getContext(): EntityContext;
54
52
  }
55
53
  export declare class TranslatedAnonymousStructuredTypeEntity implements AnonymousStructuredTypeEntity {
56
54
  readonly kind = EntityKind.Type;
@@ -62,7 +60,6 @@ export declare class TranslatedAnonymousStructuredTypeEntity implements Anonymou
62
60
  private readonly members;
63
61
  private readonly baseObjectType;
64
62
  private readonly baseAspectTypes;
65
- private readonly context;
66
63
  constructor(originalEntity: AnonymousStructuredTypeEntity, translation: Translation, translationPackage: AnalyzedTranslationPackage);
67
64
  getContainingPackage(): PackageEntity;
68
65
  getTranslation(): Translation | undefined;
@@ -82,7 +79,6 @@ export declare class TranslatedAnonymousStructuredTypeEntity implements Anonymou
82
79
  isHidden(): EntityHidingLevel | undefined;
83
80
  getTags(): readonly Tag[];
84
81
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
85
- getContext(): EntityContext;
86
82
  }
87
83
  export declare class LocalizedBaseObjectType extends BaseObjectType {
88
84
  private readonly original;
@@ -3,7 +3,7 @@ import { Tag } from '../../analysis/Tag.js';
3
3
  import { Translation } from '../../analysis/Translation.js';
4
4
  import { PackageDialect, PackageLocale } from '../../common/index.js';
5
5
  import { EntityHidingLevel } from '../EntityHiding.js';
6
- import { EntityContext, EntityKind, NamedTypeEntity } from '../index.js';
6
+ import { EntityKind, NamedTypeEntity } from '../index.js';
7
7
  import { PackageEntity } from '../interfaces/PackageEntity.js';
8
8
  import type { TypeExtensionEntity, TypeExtensionEntityDefinition } from '../interfaces/TypeExtensionEntity.js';
9
9
  import { TypeEntityMembers } from '../TypeEntityMembers.js';
@@ -14,7 +14,6 @@ export declare class TranslatedTypeExtensionEntity implements TypeExtensionEntit
14
14
  private readonly translationPackage;
15
15
  private readonly members;
16
16
  private readonly extendedTypeEntity;
17
- private readonly context;
18
17
  constructor(originalEntity: TypeExtensionEntity, translation: Translation, translationPackage: AnalyzedTranslationPackage);
19
18
  getMembers(): TypeEntityMembers;
20
19
  getContainingPackage(): PackageEntity;
@@ -22,7 +21,6 @@ export declare class TranslatedTypeExtensionEntity implements TypeExtensionEntit
22
21
  getDefinition(): TypeExtensionEntityDefinition;
23
22
  isHidden(): EntityHidingLevel | undefined;
24
23
  getTags(): readonly Tag[];
25
- getContext(): EntityContext;
26
24
  getTranslation(): Translation | undefined;
27
25
  getLocale(): PackageLocale;
28
26
  getDialect(): PackageDialect;
@@ -5,7 +5,7 @@ import { Name, PackageDialect, PackageLocale } from '../../common/index.js';
5
5
  import * as types from '../../types/index.js';
6
6
  import { EntityHidingLevel } from '../EntityHiding.js';
7
7
  import { EntityLocalizationContext } from '../EntityLocalizationContext.js';
8
- import { EntityContext, EntityKind, PackageEntity } from '../index.js';
8
+ import { EntityKind, PackageEntity } from '../index.js';
9
9
  import type { EntityContainingTypeParameter, TypeParameterEntity } from '../interfaces/TypeParameterEntity.js';
10
10
  import { CycleFreeConstraintResolutionResult, TypeParameterConstraint, TypeParameterEntityDefinition } from '../interfaces/TypeParameterEntity.js';
11
11
  import { TypeEntityKind } from '../TypeEntity.js';
@@ -19,7 +19,6 @@ export declare class TranslatedTypeParameterEntity implements TypeParameterEntit
19
19
  private readonly containingEntity;
20
20
  private readonly defaultType;
21
21
  private readonly constraint;
22
- private readonly context;
23
22
  constructor(originalEntity: TypeParameterEntity, translation: Translation, name: Name, translationPackage: AnalyzedTranslationPackage, translatedContainingEntity: EntityContainingTypeParameter);
24
23
  getName(): Name;
25
24
  getConstraint(): TypeParameterConstraint;
@@ -34,7 +33,6 @@ export declare class TranslatedTypeParameterEntity implements TypeParameterEntit
34
33
  getLocale(): PackageLocale;
35
34
  getDialect(): PackageDialect;
36
35
  getOriginalEntity(): TypeParameterEntity;
37
- getContext(): EntityContext;
38
36
  getTags(): readonly Tag[];
39
37
  }
40
38
  export declare class LocalizedTypeParameterConstraint extends TypeParameterConstraint {
@@ -7,7 +7,7 @@ import * as types from '../../types/Type.js';
7
7
  import { BaseObjectType } from '../BaseObjectType.js';
8
8
  import { EntityHidingLevel } from '../EntityHiding.js';
9
9
  import { EntityNaming } from '../EntityNaming.js';
10
- import { EntityContext, EntityKind } from '../index.js';
10
+ import { EntityKind } from '../index.js';
11
11
  import { PackageEntity } from '../interfaces/PackageEntity.js';
12
12
  import { TypeParameterEntity } from '../interfaces/TypeParameterEntity.js';
13
13
  import type { AnonymousVariantTypeEntity, PackageVariantTypeEntity } from '../interfaces/VariantTypeEntity.js';
@@ -28,7 +28,6 @@ export declare class TranslatedPackageVariantTypeEntity implements PackageVarian
28
28
  private readonly underlyingType;
29
29
  private readonly members;
30
30
  private readonly baseObjectType;
31
- private readonly context;
32
31
  constructor(originalEntity: PackageVariantTypeEntity, translation: Translation, name: Name, translationPackage: AnalyzedTranslationPackage, node: tree.TypeTranslationDeclaration | undefined);
33
32
  getName(): Name;
34
33
  getContainingPackage(): PackageEntity;
@@ -46,7 +45,6 @@ export declare class TranslatedPackageVariantTypeEntity implements PackageVarian
46
45
  getTags(): readonly Tag[];
47
46
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
48
47
  getBaseObjectType(): BaseObjectType;
49
- getContext(): EntityContext;
50
48
  }
51
49
  export declare class TranslatedAnonymousVariantTypeEntity implements AnonymousVariantTypeEntity {
52
50
  readonly kind = EntityKind.Type;
@@ -58,7 +56,6 @@ export declare class TranslatedAnonymousVariantTypeEntity implements AnonymousVa
58
56
  private readonly underlyingType;
59
57
  private readonly members;
60
58
  private readonly baseObjectType;
61
- private readonly context;
62
59
  constructor(originalEntity: AnonymousVariantTypeEntity, translation: Translation, translationPackage: AnalyzedTranslationPackage);
63
60
  getContainingPackage(): PackageEntity;
64
61
  getTranslation(): Translation | undefined;
@@ -75,5 +72,4 @@ export declare class TranslatedAnonymousVariantTypeEntity implements AnonymousVa
75
72
  getTags(): readonly Tag[];
76
73
  getSubstitutionApplicationMode(): SubstitutionApplicationMode;
77
74
  getBaseObjectType(): BaseObjectType;
78
- getContext(): EntityContext;
79
75
  }
@@ -1,12 +1,20 @@
1
1
  import { PackageDialect, PackageLocale } from '../common/index.js';
2
+ import { KeywordFlags } from '../tree/KeywordFlags.js';
2
3
  import { KeywordKind } from '../tree/KeywordKind.js';
3
4
  export type KeywordDictionary = Map<string, KeywordPart>;
4
- export type KeywordKindDictionary = Map<KeywordKind, Array<string>>;
5
+ export type KeywordKindDictionary = Map<KeywordKind, Array<Keyword>>;
5
6
  export declare class KeywordPart {
6
- value: string;
7
+ readonly value: string;
7
8
  keywordKind: KeywordKind;
9
+ flags: KeywordFlags;
8
10
  subsequentParts?: KeywordDictionary;
9
11
  constructor(value: string);
10
12
  }
13
+ export declare class Keyword {
14
+ readonly value: string;
15
+ readonly kind: KeywordKind;
16
+ readonly flags: KeywordFlags;
17
+ constructor(value: string, kind: KeywordKind, flags: KeywordFlags);
18
+ }
11
19
  export declare function getOrCreateKeywordDictionary(locale: PackageLocale, dialect: PackageDialect): KeywordDictionary;
12
20
  export declare function getOrCreateKeywordKindDictionary(locale: PackageLocale, dialect: PackageDialect): KeywordKindDictionary;
@@ -27,48 +27,50 @@ export declare enum TokenKind {
27
27
  BackQuote = 25,
28
28
  Bar = 26,
29
29
  BarBar = 27,
30
- Caret = 28,
31
- RightBrace = 29,
32
- RightParenthesis = 30,
33
- RightSquareBracket = 31,
34
- Colon = 32,
35
- Comma = 33,
36
- CommercialAt = 34,
37
- Dot = 35,
38
- DoublePeriod = 36,
39
- Ellipsis = 37,
40
- EqualsEquals = 38,
41
- EqualsRightAngle = 39,
42
- Exclamation = 40,
43
- ExclamationEquals = 41,
44
- RightAngle = 42,
45
- RightAngleEquals = 43,
46
- HashSign = 44,
47
- LeftAngle = 45,
48
- LeftAngleEquals = 46,
49
- LeftAngleMinus = 47,
50
- Minus = 48,
51
- MinusMinus = 49,
52
- MinusEquals = 50,
53
- MinusRightAngle = 51,
54
- LeftBrace = 52,
55
- LeftParenthesis = 53,
56
- LeftSquareBracket = 54,
57
- Plus = 55,
58
- PlusPlus = 56,
59
- PlusEquals = 57,
60
- Question = 58,
61
- QuestionQuestion = 59,
62
- Semicolon = 60,
63
- Slash = 61,
64
- SlashEquals = 62,
65
- Tilde = 63,
66
- TildeTilde = 64,
67
- Underscore = 65,
68
- Equals = 66,
69
- Percent = 67,
70
- PercentPercent = 68,
71
- BackSlash = 69,
72
- BackSlashEquals = 70,
73
- BackSlashBackSlash = 71
30
+ BarEquals = 28,
31
+ BarBarEquals = 29,
32
+ Caret = 30,
33
+ RightBrace = 31,
34
+ RightParenthesis = 32,
35
+ RightSquareBracket = 33,
36
+ Colon = 34,
37
+ Comma = 35,
38
+ CommercialAt = 36,
39
+ Dot = 37,
40
+ DoublePeriod = 38,
41
+ Ellipsis = 39,
42
+ EqualsEquals = 40,
43
+ Exclamation = 41,
44
+ ExclamationEquals = 42,
45
+ RightAngle = 43,
46
+ RightAngleRightAngle = 44,
47
+ RightAngleRightAngleRightAngle = 45,
48
+ HashSign = 46,
49
+ LeftAngle = 47,
50
+ LeftAngleLeftAngle = 48,
51
+ LeftAngleMinus = 49,
52
+ Minus = 50,
53
+ MinusMinus = 51,
54
+ MinusEquals = 52,
55
+ MinusRightAngle = 53,
56
+ LeftBrace = 54,
57
+ LeftParenthesis = 55,
58
+ LeftSquareBracket = 56,
59
+ Plus = 57,
60
+ PlusPlus = 58,
61
+ PlusEquals = 59,
62
+ Question = 60,
63
+ QuestionQuestion = 61,
64
+ Semicolon = 62,
65
+ Slash = 63,
66
+ SlashEquals = 64,
67
+ Tilde = 65,
68
+ TildeTilde = 66,
69
+ Underscore = 67,
70
+ Equals = 68,
71
+ Percent = 69,
72
+ PercentPercent = 70,
73
+ BackSlash = 71,
74
+ BackSlashEquals = 72,
75
+ BackSlashBackSlash = 73
74
76
  }
@@ -12,7 +12,8 @@ export declare const customRequests: {
12
12
  deleteSourceFile: CustomRequestType<DeleteSourceFileParams, void>;
13
13
  getNodeRange: CustomRequestType<GetNodeRangeParams, ls.Range | null>;
14
14
  assignField: CustomRequestType<AssignFieldParams, void>;
15
- addBlockToScript: CustomRequestType<AddBlockToScriptParams, void>;
15
+ addBlocksToScript: CustomRequestType<AddBlocksToScriptParams, void>;
16
+ canDeleteBlocksFromScript: CustomRequestType<CanDeleteBlocksFromScriptParams, boolean>;
16
17
  deleteBlocksFromScript: CustomRequestType<DeleteBlocksFromScriptParams, void>;
17
18
  };
18
19
  export type GetLocalesAvailableForTranslationParams = {
@@ -74,7 +75,7 @@ export type AssignFieldParams = {
74
75
  /**
75
76
  * Путь к узлу функции, в котором нужно расположить присваивание.
76
77
  */
77
- functionNodeUri: SyntaxNodeUri;
78
+ scriptFunctionUri: SyntaxNodeUri;
78
79
  /**
79
80
  * Имя поля.
80
81
  */
@@ -90,15 +91,25 @@ export type AssignFieldParams = {
90
91
  */
91
92
  lastAssignmentNodeUri?: SyntaxNodeUri;
92
93
  };
93
- export type AddBlockToScriptParams = {
94
- functionNodeUri: SyntaxNodeUri;
94
+ export type AddBlocksToScriptParams = ScriptBlocksAddedToOuterScript[];
95
+ export type ScriptBlocksAddedToOuterScript = {
96
+ outerScriptFunctionUri: SyntaxNodeUri;
97
+ values: AddedScriptBlock[];
98
+ };
99
+ export type AddedScriptBlock = {
95
100
  name: string;
96
101
  key: string;
97
- elementProperties: {
102
+ areaIndex?: string;
103
+ elementProperties?: {
98
104
  [T in string]: string;
99
105
  };
106
+ nestedBlocks?: AddedScriptBlock[];
107
+ };
108
+ export type CanDeleteBlocksFromScriptParams = {
109
+ outerScriptFunctionUri: SyntaxNodeUri;
110
+ scriptFunctionUris: SyntaxNodeUri[];
100
111
  };
101
112
  export type DeleteBlocksFromScriptParams = {
102
- functionNodeUris: SyntaxNodeUri[];
113
+ scriptFunctionUris: SyntaxNodeUri[];
103
114
  };
104
115
  export {};
@@ -61,6 +61,7 @@ export declare class DisplayService {
61
61
  private displayAliasTypeUsage;
62
62
  private displayUnionOrIntersectionTypeUsage;
63
63
  private displayUnresolvedTypeUsage;
64
+ private displaySubstitutionStubTypeUsage;
64
65
  private displayTypeInternal;
65
66
  private displayTypeUsageInternal;
66
67
  private displayUnionOrIntersectionTypeTypes;
@@ -540,7 +541,7 @@ interface IOperatorDeclaration {
540
541
  getReturnType(): types.Type;
541
542
  getContainer(analyzer: Analyzer | undefined): DeclarationContainer | undefined;
542
543
  }
543
- export type TypeUsage = StructuredTypeUsage | VariantTypeUsage | FunctionTypeUsage | AliasTypeUsage | ParameterTypeUsage | UnionOrIntersectionTypeUsage | UnresolvedTypeUsage;
544
+ export type TypeUsage = StructuredTypeUsage | VariantTypeUsage | FunctionTypeUsage | AliasTypeUsage | ParameterTypeUsage | UnionOrIntersectionTypeUsage | UnresolvedTypeUsage | SubstitutionStubTypeUsage;
544
545
  export type StructuredTypeUsage = StructuredTypeUsage_type | StructuredTypeUsage_entity;
545
546
  export declare class StructuredTypeUsage_type implements IStructuredTypeUsage {
546
547
  readonly type: types.StructuredType;
@@ -678,6 +679,13 @@ type UnresolvedTypeUsage = UnresolvedTypeUsage_type;
678
679
  declare class UnresolvedTypeUsage_type {
679
680
  readonly kind = "unresolved";
680
681
  }
682
+ type SubstitutionStubTypeUsage = SubstitutionStubTypeUsage_type;
683
+ declare class SubstitutionStubTypeUsage_type {
684
+ readonly type: types.SubstitutionStubType;
685
+ readonly kind = "substitution-stub";
686
+ constructor(type: types.SubstitutionStubType);
687
+ getIndex(): number;
688
+ }
681
689
  type TypeMemberDeclarationContainer = DeclarationContainer.Type | DeclarationContainer.TypeExtension;
682
690
  type DeclarationContainer = DeclarationContainer.Type | DeclarationContainer.TypeExtension | DeclarationContainer.Package;
683
691
  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 assignFieldService;
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 onAddBlockToScript;
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
+ }
@@ -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,17 +10,28 @@ 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;
16
20
  private convertPackageVariantType;
21
+ private convertPackageVariantTypeModifiers;
17
22
  private convertPackageFunctionType;
23
+ private convertPackageFunctionTypeModifiers;
18
24
  private convertTypeEntityMembers;
19
25
  private convertField;
26
+ private convertFieldModifiers;
20
27
  private convertMethod;
28
+ private convertMethodModifiers;
21
29
  private convertConstructor;
30
+ private convertConstructorModifiers;
22
31
  private convertDestructor;
32
+ private convertDestructorModifiers;
23
33
  private convertIndexer;
34
+ private convertIndexerModifiers;
24
35
  private convertVariant;
25
36
  private createStructuredTypeDeclarationBody;
26
37
  private createAliasTypeDeclarationBody;
@@ -42,5 +53,6 @@ export declare class EntityToSyntax {
42
53
  private convertUnionType;
43
54
  private convertIntersectionType;
44
55
  private convertUnresolvedType;
56
+ private convertSubstitutionStubType;
45
57
  private createNamedTypeSpecifier;
46
58
  }
@@ -1,6 +1,12 @@
1
1
  import { PackageDialect, PackageLocale, Range } from '../common/index.js';
2
- import { Node, SourceFile } from './Nodes.js';
3
- import { Token } from './Token.js';
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
+ }
@@ -58,5 +58,7 @@ export declare enum KeywordKind {
58
58
  Base = 56,
59
59
  Null = 57,
60
60
  Get = 58,
61
- Set = 59
61
+ Set = 59,
62
+ LoopWhile = 60,
63
+ Over = 61
62
64
  }