@artel/artc 0.6.25281 → 0.6.25282

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 (69) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +16 -10
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +286 -201
  5. package/build/{chunk-7OXU5662.js → chunk-3DN3M64Y.js} +3 -3
  6. package/build/{chunk-NVHCHE3R.js → chunk-DURHSZYF.js} +3 -3
  7. package/build/{chunk-TIWNEKIS.js → chunk-VVFLEWSA.js} +2957 -3104
  8. package/build/types/analysis/AccessedFunction.d.ts +4 -0
  9. package/build/types/analysis/Analyzer.d.ts +27 -35
  10. package/build/types/analysis/AutotypeCallExpressionMeaning.d.ts +5 -5
  11. package/build/types/analysis/BaseExpressionMeaning.d.ts +8 -18
  12. package/build/types/analysis/CallExpressionMeaning.d.ts +4 -9
  13. package/build/types/analysis/DereferenceExpressionMeaning.d.ts +3 -4
  14. package/build/types/analysis/IdentifierExpressionMeaning.d.ts +8 -16
  15. package/build/types/analysis/IndexedAccessExpressionMeaning.d.ts +4 -8
  16. package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +8 -16
  17. package/build/types/analysis/NamedTypeResolver.d.ts +4 -4
  18. package/build/types/analysis/NamedTypeSpecifierResolver.d.ts +4 -4
  19. package/build/types/analysis/NodeTypeUtils.d.ts +1 -1
  20. package/build/types/analysis/ObjectExpressionMeaning.d.ts +4 -9
  21. package/build/types/analysis/PackageMemberConflictsValidator.d.ts +1 -1
  22. package/build/types/analysis/SourceFileAnalyzer.d.ts +1 -0
  23. package/build/types/analysis/SubstitutedFunction.d.ts +3 -0
  24. package/build/types/analysis/TagMeaning.d.ts +4 -4
  25. package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +4 -3
  26. package/build/types/analysis/UserDefinableUnaryOperatorResolver.d.ts +4 -3
  27. package/build/types/analysis/Utils.d.ts +1 -0
  28. package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +7 -3
  29. package/build/types/api/Api.d.ts +4 -5
  30. package/build/types/common/ArrayUtils.d.ts +3 -1
  31. package/build/types/common/Displayable.d.ts +4 -4
  32. package/build/types/common/FormatString.d.ts +1 -1
  33. package/build/types/common/index.d.ts +3 -0
  34. package/build/types/diagnostic/DiagnosticCode.d.ts +238 -238
  35. package/build/types/diagnostic/DiagnosticData.d.ts +2 -2
  36. package/build/types/emitter/IrBuilder.d.ts +3 -1
  37. package/build/types/emitter/IrFactory.d.ts +2 -2
  38. package/build/types/emitter/Transformer.d.ts +3 -3
  39. package/build/types/emitter/ir/Nodes.d.ts +6 -6
  40. package/build/types/emitter/ir/types.d.ts +2 -2
  41. package/build/types/entities/{PackageMembers.d.ts → PackageEntityMembers.d.ts} +1 -1
  42. package/build/types/entities/index.d.ts +1 -1
  43. package/build/types/entities/interfaces/PackageEntity.d.ts +1 -2
  44. package/build/types/entities/interfaces/VariableEntity.d.ts +1 -1
  45. package/build/types/entities/source/SourcePackageEntity.d.ts +1 -2
  46. package/build/types/entities/source/SourceVariableEntity.d.ts +2 -2
  47. package/build/types/entities/translated/TranslatedPackageEntity.d.ts +2 -3
  48. package/build/types/services/AddBlockToScriptService.d.ts +17 -0
  49. package/build/types/services/CustomRequests.d.ts +11 -2
  50. package/build/types/services/DisplayService.d.ts +1 -2
  51. package/build/types/services/LanguageServer.d.ts +3 -1
  52. package/build/types/services/SourceFileItemsService.d.ts +1 -1
  53. package/build/types/tree/NodeKind.d.ts +1 -1
  54. package/build/types/tree/Nodes.d.ts +6 -6
  55. package/build/types/tree/SyntaxFactory.d.ts +1 -1
  56. package/build/types/tree/SyntaxToCode.d.ts +1 -1
  57. package/build/types/tree/Token.d.ts +4 -3
  58. package/build/types/tree/TokenKind.d.ts +58 -60
  59. package/build/types/types/AliasType.d.ts +1 -1
  60. package/build/types/types/FunctionType.d.ts +2 -2
  61. package/build/types/types/IntersectionType.d.ts +1 -1
  62. package/build/types/types/ParameterType.d.ts +1 -1
  63. package/build/types/types/Substitutions.d.ts +1 -1
  64. package/build/types/types/Type.d.ts +1 -4
  65. package/build/types/types/TypeMembers.d.ts +8 -8
  66. package/build/types/types/UnionType.d.ts +1 -1
  67. package/build/types/types/VariantType.d.ts +1 -1
  68. package/package.json +1 -1
  69. package/build/types/analysis/SourceFileMembers.d.ts +0 -29
@@ -1,6 +1,6 @@
1
1
  import { TextKey } from '../analysis/TextIdentity.js';
2
2
  import { Name } from '../common/index.js';
3
- import { NamedPackageMemberEntity, TextTranslationEntity, TypeEntity, TypeExtensionEntity } from '../entities/index.js';
3
+ import { NamedPackageMemberEntity, TextTranslationEntity, TypeEntity, TypeExtensionEntity } from './index.js';
4
4
  export declare class PackageEntityMembers {
5
5
  private readonly namedMembers;
6
6
  private readonly typeExtensions;
@@ -9,7 +9,7 @@ export * from './EntityNaming.js';
9
9
  export * from './interfaces/index.js';
10
10
  export * from './intrinsic/index.js';
11
11
  export * from './OperatorKind.js';
12
- export * from './PackageMembers.js';
12
+ export * from './PackageEntityMembers.js';
13
13
  export * from './source/index.js';
14
14
  export * from './SubstitutionApplicationMode.js';
15
15
  export * from './TypeEntity.js';
@@ -4,8 +4,7 @@ import { PackageDialect, PackageLocale } from '../../common/index.js';
4
4
  import type { JavaScriptImplementationConfig, SourcePackage } from '../../project/index.js';
5
5
  import { PackageName, PlatformKind } from '../../project/index.js';
6
6
  import { IEntity } from '../IEntity.js';
7
- import { DefinitionKind, EntityKind } from '../index.js';
8
- import { PackageEntityMembers } from '../PackageMembers.js';
7
+ import { DefinitionKind, EntityKind, PackageEntityMembers } from '../index.js';
9
8
  export interface PackageEntity extends IEntity {
10
9
  readonly kind: EntityKind.Package;
11
10
  getName(): PackageName;
@@ -71,7 +71,7 @@ export type VariableEntityDefinition = {
71
71
  export type SourceVariableEntityDefinition = SingleSourceVariableEntityDefinition | MultiSourceVariableEntityDefinition;
72
72
  export type SingleSourceVariableEntityDefinition = {
73
73
  kind: 'single';
74
- node: tree.PackageVariableDeclaration | tree.FieldDeclaration | tree.LocalVariableDeclaration | tree.ForStatementVariableDeclaration | tree.ErrorVariableDeclaration | tree.ParameterDeclaration | tree.VariantDeclaration | tree.TranslationTextTemplateParameter;
74
+ node: tree.PackageVariableDeclaration | tree.FieldDeclaration | tree.LocalVariableDeclaration | tree.ForStatementVariableDeclaration | tree.ErrorVariableDeclaration | tree.ParameterDeclaration | tree.VariantValueDeclaration | tree.TranslationTextTemplateParameter;
75
75
  };
76
76
  export type MultiSourceVariableEntityDefinition = {
77
77
  kind: 'multi';
@@ -4,8 +4,7 @@ import { Translation } from '../../analysis/Translation.js';
4
4
  import { PackageDialect, PackageLocale } from '../../common/index.js';
5
5
  import type { SourcePackage } from '../../project/index.js';
6
6
  import { PackageName, PlatformKind } from '../../project/index.js';
7
- import { EntityKind, InterfacePackageEntityInfo, PackageEntity, PackageEntityDefinition, TextTranslationPackageEntityInfo } from '../index.js';
8
- import { PackageEntityMembers } from '../PackageMembers.js';
7
+ import { EntityKind, InterfacePackageEntityInfo, PackageEntity, PackageEntityDefinition, PackageEntityMembers, TextTranslationPackageEntityInfo } from '../index.js';
9
8
  export declare class SourcePackageEntity implements PackageEntity {
10
9
  private readonly analyzer;
11
10
  private readonly package_;
@@ -134,7 +134,7 @@ export declare class ComputedFieldDeclarationEntity implements FieldEntity {
134
134
  getOriginalEntity(): FieldEntity;
135
135
  ensureAllDiagnosticsReported(): void;
136
136
  }
137
- export declare class VariantDeclarationEntity implements FieldEntity {
137
+ export declare class VariantValueDeclarationEntity implements FieldEntity {
138
138
  readonly kind = EntityKind.Variable;
139
139
  readonly subkind = "field";
140
140
  private readonly analyzer;
@@ -143,7 +143,7 @@ export declare class VariantDeclarationEntity implements FieldEntity {
143
143
  private readonly name;
144
144
  private readonly type;
145
145
  private containingEntity;
146
- constructor(analyzer: Analyzer, node: tree.VariantDeclaration);
146
+ constructor(analyzer: Analyzer, node: tree.VariantValueDeclaration);
147
147
  getName(): Name;
148
148
  getType(): types.Type;
149
149
  getDefinition(): VariableEntityDefinition;
@@ -1,13 +1,12 @@
1
1
  import { AnalyzedTranslationPackage } from '../../analysis/AnalyzedTranslationPackage.js';
2
2
  import { Tag } from '../../analysis/Tag.js';
3
3
  import { Translation } from '../../analysis/Translation.js';
4
- import { PackageDialect } from '../../common/PackageDialect.js';
5
- import { PackageLocale } from '../../common/PackageLocale.js';
4
+ import { PackageDialect, PackageLocale } from '../../common/index.js';
6
5
  import { PackageName, PlatformKind } from '../../project/SourcePackage.js';
7
6
  import { EntityKind } from '../index.js';
8
7
  import type { PackageEntity, TextTranslationPackageEntityInfo } from '../interfaces/PackageEntity.js';
9
8
  import { InterfacePackageEntityInfo, PackageEntityDefinition } from '../interfaces/PackageEntity.js';
10
- import { PackageEntityMembers } from '../PackageMembers.js';
9
+ import { PackageEntityMembers } from '../PackageEntityMembers.js';
11
10
  export declare class TranslatedPackageEntity implements PackageEntity {
12
11
  readonly kind = EntityKind.Package;
13
12
  private readonly originalEntity;
@@ -0,0 +1,17 @@
1
+ import { SubprogramDeclarationOrLiteral } from '../analysis/NodeTypeUtils.js';
2
+ import { SourceFile } from '../project/index.js';
3
+ import { SourceFileEdit } from './Types.js';
4
+ export declare class AddBlockToScriptService {
5
+ private static readonly indentationStep;
6
+ private static readonly elementParameterName;
7
+ createEditAddingBlock(sourceFile: SourceFile, subprogramDeclaration: SubprogramDeclarationOrLiteral, addedBlockInfo: AddedScriptBlockInfo): SourceFileEdit | undefined;
8
+ private createScriptBlockText;
9
+ private detectNewLine;
10
+ }
11
+ export interface AddedScriptBlockInfo {
12
+ readonly name: string;
13
+ readonly key: string;
14
+ readonly elementProperties: {
15
+ readonly [T in string]: string;
16
+ };
17
+ }
@@ -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
- deleteBlockFromScript: CustomRequestType<DeleteBlockFromScriptParams, void>;
15
+ addBlockToScript: CustomRequestType<AddBlockToScriptParams, void>;
16
+ deleteBlocksFromScript: CustomRequestType<DeleteBlocksFromScriptParams, void>;
16
17
  };
17
18
  export type GetLocalesAvailableForTranslationParams = {
18
19
  textDocument: ls.TextDocumentIdentifier;
@@ -89,7 +90,15 @@ export type AssignFieldParams = {
89
90
  */
90
91
  lastAssignmentNodeUri?: SyntaxNodeUri;
91
92
  };
92
- export type DeleteBlockFromScriptParams = {
93
+ export type AddBlockToScriptParams = {
93
94
  functionNodeUri: SyntaxNodeUri;
95
+ name: string;
96
+ key: string;
97
+ elementProperties: {
98
+ [T in string]: string;
99
+ };
100
+ };
101
+ export type DeleteBlocksFromScriptParams = {
102
+ functionNodeUris: SyntaxNodeUri[];
94
103
  };
95
104
  export {};
@@ -2,8 +2,7 @@ import { AccessedFunction } from '../analysis/AccessedFunction.js';
2
2
  import { PackageNameTreeNode } from '../analysis/ImportedPackageNameTree.js';
3
3
  import { SubstitutedFunction } from '../analysis/SubstitutedFunction.js';
4
4
  import { Analyzer } from '../analysis/index.js';
5
- import { HelperPhraseKind } from '../common/HelperPhrases.js';
6
- import { Name, PackageDialect, PackageLocale } from '../common/index.js';
5
+ import { HelperPhraseKind, Name, PackageDialect, PackageLocale } from '../common/index.js';
7
6
  import * as e from '../entities/index.js';
8
7
  import { NamedEntity, StructuredTypeKind } from '../entities/index.js';
9
8
  import { SourceFile } from '../project/index.js';
@@ -33,6 +33,7 @@ export declare class LanguageServer {
33
33
  private readonly fileSystemTreeDisplayService;
34
34
  private readonly selectionRangeService;
35
35
  private readonly assignFieldService;
36
+ private readonly addBlockToScriptService;
36
37
  private readonly deleteBlockFromScriptService;
37
38
  private readonly codeActionsService;
38
39
  constructor(config: LanguageServerConfig);
@@ -61,7 +62,8 @@ export declare class LanguageServer {
61
62
  private convertSourceFileItemKind;
62
63
  private convertDiagnostic;
63
64
  private onAssignField;
64
- private onDeleteBlockFromScript;
65
+ private onAddBlockToScript;
66
+ private onDeleteBlocksFromScript;
65
67
  private convertSourceFileEdit;
66
68
  private convertSourceFileEditsToWorkspaceEdit;
67
69
  private onGetNodeRange;
@@ -28,7 +28,7 @@ export declare const enum ItemKind {
28
28
  FunctionType = 6,
29
29
  VariantType = 7,
30
30
  InvalidType = 8,
31
- Variant = 9,
31
+ VariantValue = 9,
32
32
  Constructor = 10,
33
33
  Destructor = 11,
34
34
  Field = 12,
@@ -146,7 +146,7 @@ export declare enum NodeKind {
146
146
  TranslationTextTemplateSpanList = 144,
147
147
  TranslationTextTemplateSpan = 145,
148
148
  TranslationTextTemplateParameter = 146,
149
- VariantDeclaration = 147,
149
+ VariantValueDeclaration = 147,
150
150
  TypeParameterDeclaration = 148,
151
151
  ParameterDeclaration = 149,
152
152
  Argument = 150,
@@ -608,7 +608,7 @@ export declare class MissingPackageMemberDeclaration extends BaseNode {
608
608
  protected get thisAsNode(): Node;
609
609
  constructor(tagList: TagList, modifierList: ModifierList, rangeWithTrivia: Range | undefined);
610
610
  }
611
- export type TypeMemberDeclaration = FieldDeclaration | FieldGetterDeclaration | FieldSetterDeclaration | VariantDeclaration | MethodDeclaration | OperatorDeclaration | ConstructorDeclaration | DestructorDeclaration | IndexedElementGetterDeclaration | IndexedElementSetterDeclaration | DereferencedVariableGetterDeclaration | DereferencedVariableSetterDeclaration | TypeMemberGroupDeclaration | MissingTypeMemberDeclaration;
611
+ export type TypeMemberDeclaration = FieldDeclaration | FieldGetterDeclaration | FieldSetterDeclaration | VariantValueDeclaration | MethodDeclaration | OperatorDeclaration | ConstructorDeclaration | DestructorDeclaration | IndexedElementGetterDeclaration | IndexedElementSetterDeclaration | DereferencedVariableGetterDeclaration | DereferencedVariableSetterDeclaration | TypeMemberGroupDeclaration | MissingTypeMemberDeclaration;
612
612
  export declare class TypeMemberGroupDeclaration extends BaseNode {
613
613
  readonly kind = NodeKind.TypeMemberGroupDeclaration;
614
614
  readonly children: readonly [
@@ -918,7 +918,7 @@ export declare class ForStatementVariableDeclaration extends BaseNode {
918
918
  constructor(name: Identifier, rangeWithTrivia: Range | undefined);
919
919
  }
920
920
  export type Expression = ArrayLiteral | AsExpression | AssertionExpression | AssumptionExpression | BinaryExpression | FunctionLiteral | FunctionBlockLiteral | CallExpression | IdentifierExpression | AutotypeCallExpression | IndexedAccessExpression | MissingExpression | IsExpression | ParenthesizedExpression | ConditionalExpression | PrefixUnaryExpression | MemberAccessExpression | ReferenceExpression | DereferenceExpression | TextLiteral | LocalizableTextLiteral | TextTemplateLiteral | LocalizableTextTemplateLiteral | GenericSpecializationExpression | DefaultMatchExpression | TokenExpression | KeywordExpression | ObjectExpression | BaseExpression;
921
- export type ExpressionParent = ArrayLiteralElementList | AsExpression | AssertionExpression | AssumptionExpression | AssignmentStatement | BinaryExpression | Argument | CallExpression | DisposeStatement | ErrorStatement | ImportantStatement | ExpressionStatement | ForStatement | PackageVariableDeclaration | IfStatement | IndexedAccessExpression | IsExpression | LocalVariableDeclaration | MatchExpressionList | ParameterDeclaration | ParenthesizedExpression | ConditionalExpression | PrefixUnaryExpression | MemberAccessExpression | ReferenceExpression | DereferenceExpression | LoopStatement | ReturnStatement | TextTemplateSpan | FieldDeclaration | SwitchStatement | VariantDeclaration | WhileStatement | YieldStatement | GenericSpecializationExpression | ElseIfClause | TextTranslationDeclaration | FunctionBlock;
921
+ export type ExpressionParent = ArrayLiteralElementList | AsExpression | AssertionExpression | AssumptionExpression | AssignmentStatement | BinaryExpression | Argument | CallExpression | DisposeStatement | ErrorStatement | ImportantStatement | ExpressionStatement | ForStatement | PackageVariableDeclaration | IfStatement | IndexedAccessExpression | IsExpression | LocalVariableDeclaration | MatchExpressionList | ParameterDeclaration | ParenthesizedExpression | ConditionalExpression | PrefixUnaryExpression | MemberAccessExpression | ReferenceExpression | DereferenceExpression | LoopStatement | ReturnStatement | TextTemplateSpan | FieldDeclaration | SwitchStatement | VariantValueDeclaration | WhileStatement | YieldStatement | GenericSpecializationExpression | ElseIfClause | TextTranslationDeclaration | FunctionBlock;
922
922
  export type ExpressionListElement = Expression | Comma;
923
923
  export declare class ArrayLiteral extends BaseNode {
924
924
  readonly kind = NodeKind.ArrayLiteral;
@@ -1257,7 +1257,7 @@ export declare class TokenExpression extends BaseNode {
1257
1257
  protected get thisAsNode(): Node;
1258
1258
  constructor(token: TokenExpressionToken, rangeWithTrivia: Range | undefined);
1259
1259
  }
1260
- export type TokenExpressionToken = Token<TokenKind.CharLiteral> | Token<TokenKind.IntegerLiteral> | Token<TokenKind.RealLiteral> | Token<TokenKind.MeasureLiteral>;
1260
+ export type TokenExpressionToken = Token<TokenKind.IntegerLiteral> | Token<TokenKind.RealLiteral> | Token<TokenKind.MeasureLiteral>;
1261
1261
  export declare class TextLiteral extends BaseNode {
1262
1262
  readonly kind = NodeKind.TextLiteral;
1263
1263
  readonly children: readonly [
@@ -2094,8 +2094,8 @@ export declare class TranslationTextTemplateParameter extends BaseNode {
2094
2094
  protected get thisAsNode(): Node;
2095
2095
  constructor(name: Identifier, typeAnnotation: TypeAnnotation | undefined, rangeWithTrivia: Range | undefined);
2096
2096
  }
2097
- export declare class VariantDeclaration extends BaseNode {
2098
- readonly kind = NodeKind.VariantDeclaration;
2097
+ export declare class VariantValueDeclaration extends BaseNode {
2098
+ readonly kind = NodeKind.VariantValueDeclaration;
2099
2099
  readonly children: readonly [
2100
2100
  TagList,
2101
2101
  ModifierList,
@@ -2308,7 +2308,7 @@ export declare class TypeAnnotation extends BaseNode {
2308
2308
  protected get thisAsNode(): Node;
2309
2309
  constructor(colonToken: Token<TokenKind.Colon>, typeSpecifier: TypeSpecifier, rangeWithTrivia: Range | undefined);
2310
2310
  }
2311
- export type Node = Token | Keyword | SourceFile | PackageMemberDeclarationList | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackageName | NamedTypeSpecifier | UnionTypeSpecifier | IntersectionTypeSpecifier | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | MissingTypeSpecifier | AnonymousFunctionTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageFunctionDeclaration | PackageFunctionTypeDeclaration | FunctionTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | MissingPackageMemberDeclaration | TypeMemberGroupDeclaration | ConstructorDeclaration | DestructorDeclaration | IndexedElementGetterDeclaration | IndexedElementSetterDeclaration | IndexParameterClause | DereferencedVariableGetterDeclaration | DereferencedVariableSetterDeclaration | MethodDeclaration | OperatorDeclaration | FieldDeclaration | FieldGetterDeclaration | FieldSetterDeclaration | MissingTypeMemberDeclaration | NestedFunctionDeclaration | LocalVariableDeclaration | ForStatementVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | FunctionLiteral | FunctionBlockLiteral | ArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessExpression | MissingExpression | IsExpression | ParenthesizedExpression | ConditionalExpression | PrefixUnaryExpression | MemberAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | LocalizableTextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | TextLiteral | LocalizableTextLiteral | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | FunctionBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatement | TryStatement | CatchClause | ErrorVariableDeclaration | FinallyClause | ErrorStatement | ImportantStatement | ExpressionStatement | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | ElseClause | MissingStatement | NestedFunctionDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | CaseClause | WhileStatement | YieldStatement | TranslationsDeclaration | TopLevelTranslationList | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexParameterTranslationClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageFunctionTranslationDeclaration | MethodTranslation | FunctionTypeTranslationDeclaration | QualifiedName | PackageVariableTranslationDeclaration | FieldOrVariantTranslation | TypeMemberTranslationList | TypeTranslationDeclaration | TextTranslationDeclaration | TextTranslationFunctionDeclaration | TranslationTextLiteral | TranslationTextTemplate | TranslationTextTemplateSpanList | TranslationTextTemplateSpan | TranslationTextTemplateParameter | VariantDeclaration | TypeParameterDeclaration | ParameterDeclaration | Argument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation;
2311
+ export type Node = Token | Keyword | SourceFile | PackageMemberDeclarationList | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackageName | NamedTypeSpecifier | UnionTypeSpecifier | IntersectionTypeSpecifier | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | MissingTypeSpecifier | AnonymousFunctionTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageFunctionDeclaration | PackageFunctionTypeDeclaration | FunctionTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | MissingPackageMemberDeclaration | TypeMemberGroupDeclaration | ConstructorDeclaration | DestructorDeclaration | IndexedElementGetterDeclaration | IndexedElementSetterDeclaration | IndexParameterClause | DereferencedVariableGetterDeclaration | DereferencedVariableSetterDeclaration | MethodDeclaration | OperatorDeclaration | FieldDeclaration | FieldGetterDeclaration | FieldSetterDeclaration | MissingTypeMemberDeclaration | NestedFunctionDeclaration | LocalVariableDeclaration | ForStatementVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | FunctionLiteral | FunctionBlockLiteral | ArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessExpression | MissingExpression | IsExpression | ParenthesizedExpression | ConditionalExpression | PrefixUnaryExpression | MemberAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | LocalizableTextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | TextLiteral | LocalizableTextLiteral | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | FunctionBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatement | TryStatement | CatchClause | ErrorVariableDeclaration | FinallyClause | ErrorStatement | ImportantStatement | ExpressionStatement | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | ElseClause | MissingStatement | NestedFunctionDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | CaseClause | WhileStatement | YieldStatement | TranslationsDeclaration | TopLevelTranslationList | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexParameterTranslationClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageFunctionTranslationDeclaration | MethodTranslation | FunctionTypeTranslationDeclaration | QualifiedName | PackageVariableTranslationDeclaration | FieldOrVariantTranslation | TypeMemberTranslationList | TypeTranslationDeclaration | TextTranslationDeclaration | TextTranslationFunctionDeclaration | TranslationTextLiteral | TranslationTextTemplate | TranslationTextTemplateSpanList | TranslationTextTemplateSpan | TranslationTextTemplateParameter | VariantValueDeclaration | TypeParameterDeclaration | ParameterDeclaration | Argument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation;
2312
2312
  type NodesWithChild<Child, Nodes = Node> = Nodes extends {
2313
2313
  children: readonly (infer C)[];
2314
2314
  } ? Child extends C ? Nodes : never : never;
@@ -26,7 +26,7 @@ export declare class SyntaxFactory {
26
26
  static indexedElementSetterDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], parameters: readonly tree.ParameterDeclaration[], body: tree.FunctionBlock | undefined): tree.IndexedElementSetterDeclaration;
27
27
  static typeMemberGroupDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], members: readonly tree.TypeMemberDeclaration[]): tree.TypeMemberGroupDeclaration;
28
28
  static typeMemberDeclarationBlock(members: readonly tree.TypeMemberDeclaration[]): tree.TypeMemberDeclarationBlock;
29
- static variantDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, value?: tree.Expression): tree.VariantDeclaration;
29
+ static variantValueDeclaration(tags: readonly tree.Tag[], modifiers: readonly tree.Modifier[], name: string, value?: tree.Expression): tree.VariantValueDeclaration;
30
30
  static parameterClause(parameters: readonly tree.ParameterDeclaration[]): tree.ParameterClause;
31
31
  static indexParameterClause(indexParameters: readonly tree.ParameterDeclaration[]): tree.IndexParameterClause;
32
32
  static namedTypeSpecifier(name: string | readonly string[], typeArguments?: readonly tree.TypeSpecifier[]): tree.NamedTypeSpecifier;
@@ -48,7 +48,7 @@ export declare class SyntaxToCode {
48
48
  private writeIndexedElementSetterDeclaration;
49
49
  private writeDereferencedVariableGetterDeclaration;
50
50
  private writeDereferencedVariableSetterDeclaration;
51
- private writeVariantDeclaration;
51
+ private writeVariantValueDeclaration;
52
52
  private writeTypeMemberGroupDeclaration;
53
53
  private writeTypeParameterClause;
54
54
  private writeTypeParameterDeclaration;
@@ -14,9 +14,10 @@ export declare const enum TokenFlags {
14
14
  HasBackQuotes = 16,// Имя с любым количеством апострофов: имя`, имя```
15
15
  ConflictResolvingParameterName = 32,// Имя с одним апострофом: имя`, выполнить`
16
16
  BackingVariableName = 64,// Имя с двумя апострофами: имя``, выполнить``
17
- StartsWithTilde = 128,// Переводимый текст: ~"текст", ~"текст{
18
- EndsWithTilde = 256,// Переводимый текст: "текст"~, }текст"~
19
- LocalizableText = 384
17
+ SingleCharText = 128,// Текст из одного символа: "а", "\/", "ю000А"
18
+ StartsWithTilde = 256,// Переводимый текст: ~"текст", ~"текст{
19
+ EndsWithTilde = 512,// Переводимый текст: "текст"~, }текст"~
20
+ LocalizableText = 768
20
21
  }
21
22
  export declare class Token<TKind extends TokenKind = TokenKind> extends BaseNode {
22
23
  readonly kind = NodeKind.Token;
@@ -4,65 +4,64 @@ export declare enum TokenKind {
4
4
  IntegerLiteral = 2,
5
5
  RealLiteral = 3,
6
6
  MeasureLiteral = 4,
7
- CharLiteral = 5,
8
- TextLiteral = 6,
9
- TextTemplateHead = 7,
10
- TextTemplatePart = 8,
11
- TextTemplateTail = 9,
12
- Identifier = 10,
13
- Ampersand = 11,
14
- AmpersandAmpersand = 12,
15
- AmpersandEquals = 13,
16
- Asterisk = 14,
17
- AsteriskAsterisk = 15,
18
- AsteriskEquals = 16,
19
- BackQuote = 17,
20
- Bar = 18,
21
- BarBar = 19,
22
- Caret = 20,
23
- CloseBrace = 21,
24
- CloseParenthesis = 22,
25
- CloseSquareBracket = 23,
26
- Colon = 24,
27
- Comma = 25,
28
- CommercialAt = 26,
29
- Dot = 27,
30
- DoublePeriod = 28,
31
- Ellipsis = 29,
32
- EqualsEquals = 30,
33
- EqualsGreaterThan = 31,
34
- Exclamation = 32,
35
- ExclamationEquals = 33,
36
- GreaterThan = 34,
37
- GreaterThanOrEqual = 35,
38
- HashSign = 36,
39
- LessThan = 37,
40
- LessThanOrEqual = 38,
41
- LessThanMinus = 39,
42
- Minus = 40,
43
- MinusMinus = 41,
44
- MinusEquals = 42,
45
- MinusGreaterThan = 43,
46
- OpenBrace = 44,
47
- OpenParenthesis = 45,
48
- OpenSquareBracket = 46,
49
- Plus = 47,
50
- PlusPlus = 48,
51
- PlusEquals = 49,
52
- Question = 50,
53
- QuestionQuestion = 51,
54
- Semicolon = 52,
55
- Slash = 53,
56
- SlashEquals = 54,
57
- Tilde = 55,
58
- TildeTilde = 56,
59
- Underscore = 57,
60
- Equals = 58,
61
- Percent = 59,
62
- PercentPercent = 60,
63
- Backslash = 61,
64
- BackslashEquals = 62,
65
- BackslashBackslash = 63
7
+ TextLiteral = 5,
8
+ TextTemplateHead = 6,
9
+ TextTemplatePart = 7,
10
+ TextTemplateTail = 8,
11
+ Identifier = 9,
12
+ Ampersand = 10,
13
+ AmpersandAmpersand = 11,
14
+ AmpersandEquals = 12,
15
+ Asterisk = 13,
16
+ AsteriskAsterisk = 14,
17
+ AsteriskEquals = 15,
18
+ BackQuote = 16,
19
+ Bar = 17,
20
+ BarBar = 18,
21
+ Caret = 19,
22
+ CloseBrace = 20,
23
+ CloseParenthesis = 21,
24
+ CloseSquareBracket = 22,
25
+ Colon = 23,
26
+ Comma = 24,
27
+ CommercialAt = 25,
28
+ Dot = 26,
29
+ DoublePeriod = 27,
30
+ Ellipsis = 28,
31
+ EqualsEquals = 29,
32
+ EqualsGreaterThan = 30,
33
+ Exclamation = 31,
34
+ ExclamationEquals = 32,
35
+ GreaterThan = 33,
36
+ GreaterThanOrEqual = 34,
37
+ HashSign = 35,
38
+ LessThan = 36,
39
+ LessThanOrEqual = 37,
40
+ LessThanMinus = 38,
41
+ Minus = 39,
42
+ MinusMinus = 40,
43
+ MinusEquals = 41,
44
+ MinusGreaterThan = 42,
45
+ OpenBrace = 43,
46
+ OpenParenthesis = 44,
47
+ OpenSquareBracket = 45,
48
+ Plus = 46,
49
+ PlusPlus = 47,
50
+ PlusEquals = 48,
51
+ Question = 49,
52
+ QuestionQuestion = 50,
53
+ Semicolon = 51,
54
+ Slash = 52,
55
+ SlashEquals = 53,
56
+ Tilde = 54,
57
+ TildeTilde = 55,
58
+ Underscore = 56,
59
+ Equals = 57,
60
+ Percent = 58,
61
+ PercentPercent = 59,
62
+ Backslash = 60,
63
+ BackslashEquals = 61,
64
+ BackslashBackslash = 62
66
65
  }
67
66
  export declare const tokenKindValues: {
68
67
  0: string;
@@ -128,5 +127,4 @@ export declare const tokenKindValues: {
128
127
  60: string;
129
128
  61: string;
130
129
  62: string;
131
- 63: string;
132
130
  };
@@ -14,7 +14,7 @@ export declare class AliasType implements IType {
14
14
  getTypeParameters(): readonly TypeParameterEntity[];
15
15
  getSubstitutions(): Substitutions;
16
16
  applySubstitutions(substitutions: Substitutions): Type;
17
- equals(other: Type): boolean;
17
+ equals(other: Type, considerLocale?: boolean): boolean;
18
18
  getEntity(): AliasTypeEntity;
19
19
  getBaseObjectTypeOrAliasedType(): Type | undefined;
20
20
  toString(): string;
@@ -1,6 +1,6 @@
1
1
  import { Analyzer } from '../analysis/index.js';
2
2
  import { FunctionTypeEntity, TypeParameterEntity } from '../entities/index.js';
3
- import { IType, Substitutions, Type, Parameter } from './index.js';
3
+ import { IType, Parameter, Substitutions, Type } from './index.js';
4
4
  export declare class FunctionType implements IType {
5
5
  private readonly analyzer;
6
6
  private readonly entity;
@@ -13,7 +13,7 @@ export declare class FunctionType implements IType {
13
13
  getTypeParameters(): readonly TypeParameterEntity[];
14
14
  getSubstitutions(): Substitutions;
15
15
  applySubstitutions(substitutions: Substitutions): FunctionType;
16
- equals(other: Type): boolean;
16
+ equals(other: Type, considerLocale?: boolean): boolean;
17
17
  getEntity(): FunctionTypeEntity;
18
18
  isAsync(): boolean;
19
19
  getReturnType(): Type;
@@ -11,7 +11,7 @@ export declare class IntersectionType implements IType {
11
11
  get unaliasedFlattenedTypes(): readonly Type[];
12
12
  get debuggerDisplay(): string;
13
13
  constructor(analyzer: Analyzer, originalTypes: readonly Type[]);
14
- equals(other: Type): boolean;
14
+ equals(other: Type, considerLocale?: boolean): boolean;
15
15
  getSubstitutions(): Substitutions;
16
16
  applySubstitutions(substitutions: Substitutions): Type;
17
17
  getEntity(): TypeEntity | undefined;
@@ -17,7 +17,7 @@ export declare class ParameterType implements IType {
17
17
  getSubstitutions(): Substitutions;
18
18
  getEntity(): TypeParameterEntity;
19
19
  applySubstitutions(substitutions: Substitutions): Type;
20
- equals(other: Type): boolean;
20
+ equals(other: Type, considerLocale?: boolean): boolean;
21
21
  getBaseObjectTypeOrAliasedType(): Type | undefined;
22
22
  toString(): string;
23
23
  }
@@ -28,6 +28,6 @@ export declare class Substitutions {
28
28
  getTypes(): Iterable<Type>;
29
29
  substituteTypes(substitutions: Substitutions): Substitutions;
30
30
  substituteTypesAndMerge(substitutions: Substitutions): Substitutions;
31
- equals(other: Substitutions): boolean;
31
+ equals(other: Substitutions, considerLocale?: boolean): boolean;
32
32
  }
33
33
  export type SubstitutionMap = ReadonlyMap<TypeParameterEntity, Type>;
@@ -12,10 +12,7 @@ export interface IType {
12
12
  readonly isNullType: boolean;
13
13
  getSubstitutions(): Substitutions;
14
14
  applySubstitutions(substitutions: Substitutions): Type;
15
- /**
16
- * Сравнивает типы без учёта языка.
17
- */
18
- equals(other: Type): boolean;
15
+ equals(other: Type, considerLocale: boolean): boolean;
19
16
  getEntity(): TypeEntity | undefined;
20
17
  getBaseObjectTypeOrAliasedType(): Type | undefined;
21
18
  }
@@ -30,7 +30,7 @@ export declare class Method implements ITypeMember {
30
30
  isOverride(): boolean;
31
31
  applySubstitutions(substitutions: Substitutions): Method;
32
32
  getTypeParametersArity(): number;
33
- equals(other: TypeMember): boolean;
33
+ equals(other: TypeMember, considerLocale?: boolean): boolean;
34
34
  toString(): string;
35
35
  }
36
36
  export declare class Parameter {
@@ -60,7 +60,7 @@ export declare class Field implements ITypeMember {
60
60
  isOverride(): boolean;
61
61
  isVariant(): boolean;
62
62
  applySubstitutions(substitutions: Substitutions): Field;
63
- equals(other: TypeMember): boolean;
63
+ equals(other: TypeMember, considerLocale?: boolean): boolean;
64
64
  toString(): string;
65
65
  }
66
66
  export declare class Operator implements ITypeMember {
@@ -82,7 +82,7 @@ export declare class Operator implements ITypeMember {
82
82
  isStatic(): boolean;
83
83
  isOverride(): boolean;
84
84
  applySubstitutions(substitutions: Substitutions): Operator;
85
- equals(other: TypeMember): boolean;
85
+ equals(other: TypeMember, considerLocale?: boolean): boolean;
86
86
  toString(): string;
87
87
  }
88
88
  export declare class Constructor implements ITypeMember {
@@ -100,7 +100,7 @@ export declare class Constructor implements ITypeMember {
100
100
  isStatic(): boolean;
101
101
  applySubstitutions(substitutions: Substitutions): TypeMember;
102
102
  getConstructedType(): Type;
103
- equals(other: TypeMember): boolean;
103
+ equals(other: TypeMember, considerLocale?: boolean): boolean;
104
104
  toString(): string;
105
105
  }
106
106
  export declare class Destructor implements ITypeMember {
@@ -116,7 +116,7 @@ export declare class Destructor implements ITypeMember {
116
116
  isHidden(): EntityHidingLevel | undefined;
117
117
  isStatic(): boolean;
118
118
  applySubstitutions(substitutions: Substitutions): Destructor;
119
- equals(other: TypeMember): boolean;
119
+ equals(other: TypeMember, considerLocale?: boolean): boolean;
120
120
  toString(): string;
121
121
  }
122
122
  export declare class Indexer implements ITypeMember {
@@ -134,7 +134,7 @@ export declare class Indexer implements ITypeMember {
134
134
  isStatic(): boolean;
135
135
  isOverride(): boolean;
136
136
  applySubstitutions(substitutions: Substitutions): Indexer;
137
- equals(other: TypeMember): boolean;
137
+ equals(other: TypeMember, considerLocale?: boolean): boolean;
138
138
  toString(): string;
139
139
  }
140
140
  export declare class DereferenceOperator implements ITypeMember {
@@ -150,13 +150,13 @@ export declare class DereferenceOperator implements ITypeMember {
150
150
  isStatic(): boolean;
151
151
  isOverride(): boolean;
152
152
  applySubstitutions(substitutions: Substitutions): DereferenceOperator;
153
- equals(other: TypeMember): boolean;
153
+ equals(other: TypeMember, considerLocale?: boolean): boolean;
154
154
  toString(): string;
155
155
  }
156
156
  export interface ITypeMember {
157
157
  isHidden(): EntityHidingLevel | undefined;
158
158
  isStatic(): boolean;
159
159
  getSubstitutions(): Substitutions;
160
- equals(other: TypeMember): boolean;
160
+ equals(other: TypeMember, considerLocale: boolean): boolean;
161
161
  applySubstitutions(substitutions: Substitutions): TypeMember;
162
162
  }
@@ -11,7 +11,7 @@ export declare class UnionType implements IType {
11
11
  get unaliasedFlattenedTypes(): readonly Type[];
12
12
  get debuggerDisplay(): string;
13
13
  constructor(analyzer: Analyzer, originalTypes: readonly Type[]);
14
- equals(other: Type): boolean;
14
+ equals(other: Type, considerLocale?: boolean): boolean;
15
15
  getSubstitutions(): Substitutions;
16
16
  applySubstitutions(substitutions: Substitutions): Type;
17
17
  getEntity(): TypeEntity | undefined;
@@ -12,7 +12,7 @@ export declare class VariantType implements IType {
12
12
  getSubstitutions(): Substitutions;
13
13
  applySubstitutions(substitutions: Substitutions): Type;
14
14
  getEntity(): VariantTypeEntity;
15
- equals(other: Type): boolean;
15
+ equals(other: Type, considerLocale?: boolean): boolean;
16
16
  getUnderlyingType(): Type;
17
17
  getBaseType(): Type | undefined;
18
18
  getBaseObjectTypeOrAliasedType(): Type | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artel/artc",
3
- "version": "0.6.25281",
3
+ "version": "0.6.25282",
4
4
  "description": "Артель Компилятор | Artel Compiler",
5
5
  "author": "Nezaboodka Team <contact@nezaboodka.com>",
6
6
  "license": "LGPL-3.0-or-later",
@@ -1,29 +0,0 @@
1
- import { Name } from '../common/index.js';
2
- import { DiagnosticAcceptor } from '../diagnostic/Diagnostic.js';
3
- import { PackageAliasEntity, PackageFunctionEntity, PackageTypeEntity, PackageVariableEntity, TextTranslationEntity, TypeExtensionEntity } from '../entities/index.js';
4
- import { Analyzer } from './Analyzer.js';
5
- import { TextKey } from './TextIdentity.js';
6
- export declare class SourceFileMembers {
7
- private static readonly emptyNamedMembers;
8
- private static readonly emptyPackageAliases;
9
- private static readonly emptyTextTranslations;
10
- private readonly analyzer;
11
- private readonly namedMembers;
12
- private readonly typeExtensions;
13
- private readonly textTranslations;
14
- private readonly declarationsByName_;
15
- private readonly textTranslationsByTextKey_;
16
- get declarationsByName(): ReadonlyMap<string, readonly NamedSourceFileMemberEntity[]>;
17
- get textTranslationsByTextKey(): ReadonlyMap<TextKey, readonly TextTranslationEntity[]>;
18
- constructor(analyzer: Analyzer, namedMembers: readonly NamedSourceFileMemberEntity[], typeExtensions: readonly TypeExtensionEntity[], textTranslations: readonly TextTranslationEntity[]);
19
- getNamedDeclarations(): readonly NamedSourceFileMemberEntity[];
20
- getNamedDeclarationsByName(name: Name): readonly NamedSourceFileMemberEntity[];
21
- getPackageAliases(): readonly PackageAliasEntity[];
22
- getPackageAliasesByName(name: Name): readonly PackageAliasEntity[];
23
- getTypeExtensions(): readonly TypeExtensionEntity[];
24
- getTextTranslations(): readonly TextTranslationEntity[];
25
- getTextTranslationsByTextKey(key: TextKey): readonly TextTranslationEntity[];
26
- validateNameConflicts(diagnostics: DiagnosticAcceptor): void;
27
- private getDiagnosticLocation;
28
- }
29
- export type NamedSourceFileMemberEntity = PackageTypeEntity | PackageVariableEntity | PackageFunctionEntity | PackageAliasEntity;