@artel/artc 0.6.25211 → 0.6.25213

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 (62) hide show
  1. package/build/Cli.js +3 -3
  2. package/build/api/Api.js +20 -18
  3. package/build/api/ApiNodeJS.js +3 -3
  4. package/build/api/ApiServices.js +748 -485
  5. package/build/{chunk-EYLAO2SF.js → chunk-6UMHRF7Y.js} +3 -3
  6. package/build/{chunk-Y3KGPV3L.js → chunk-X4XDV2CH.js} +10754 -10037
  7. package/build/{chunk-5BGDYCRQ.js → chunk-YFV3TSQP.js} +9 -8
  8. package/build/types/analysis/AnalyzedTranslationPackage.d.ts +3 -1
  9. package/build/types/analysis/Analyzer.d.ts +33 -15
  10. package/build/types/analysis/BaseExpressionMeaning.d.ts +8 -2
  11. package/build/types/analysis/CallExpressionMeaning.d.ts +6 -1
  12. package/build/types/analysis/DiagnosticCollector.d.ts +1 -0
  13. package/build/types/analysis/EntityLocalizationHelper.d.ts +3 -1
  14. package/build/types/analysis/IdentifierExpressionMeaning.d.ts +12 -4
  15. package/build/types/analysis/Lookup.d.ts +6 -2
  16. package/build/types/analysis/PrefixUnaryOperatorResolver.d.ts +1 -3
  17. package/build/types/analysis/PropertyAccessExpressionMeaning.d.ts +13 -4
  18. package/build/types/analysis/Scope.d.ts +17 -3
  19. package/build/types/analysis/SemanticContext.d.ts +18 -1
  20. package/build/types/analysis/SemanticContextBuilder.d.ts +2 -0
  21. package/build/types/analysis/StatementBlockScopeBuilder.d.ts +1 -0
  22. package/build/types/analysis/TypeMemberLookup.d.ts +3 -3
  23. package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +2 -2
  24. package/build/types/common/Cached.d.ts +1 -0
  25. package/build/types/common/Debug.d.ts +1 -1
  26. package/build/types/common/LocalizationHelper.d.ts +5 -2
  27. package/build/types/common/Uri.d.ts +11 -2
  28. package/build/types/common/index.d.ts +0 -1
  29. package/build/types/diagnostic/DiagnosticCode.d.ts +126 -115
  30. package/build/types/emitter/EmitterGeneratedDeclarationKind.d.ts +7 -0
  31. package/build/types/emitter/Entities.d.ts +1 -0
  32. package/build/types/emitter/EntityMap.d.ts +1 -2
  33. package/build/types/emitter/IrBuilder.d.ts +2 -0
  34. package/build/types/emitter/StatementTransformationResult.d.ts +3 -1
  35. package/build/types/emitter/ir/Nodes.d.ts +24 -22
  36. package/build/types/entities/OperatorEntity.d.ts +7 -9
  37. package/build/types/entities/OperatorKind.d.ts +19 -26
  38. package/build/types/entities/StructuredTypeEntity.d.ts +3 -3
  39. package/build/types/entities/TypeEntityMembers.d.ts +9 -14
  40. package/build/types/entities/TypeExtensionEntity.d.ts +0 -1
  41. package/build/types/entities/VariableEntity.d.ts +2 -2
  42. package/build/types/entities/index.d.ts +7 -12
  43. package/build/types/parser/Parser.d.ts +2 -2
  44. package/build/types/project/FileSystemTree.d.ts +1 -1
  45. package/build/types/services/CompletionService.d.ts +26 -20
  46. package/build/types/services/DisplayService.d.ts +42 -50
  47. package/build/types/services/NodeSemanticInfo.d.ts +6 -11
  48. package/build/types/services/SemanticTokensService.d.ts +4 -3
  49. package/build/types/tree/NodeKind.d.ts +105 -104
  50. package/build/types/tree/OperatorKind.d.ts +24 -7
  51. package/build/types/tree/green/Nodes.d.ts +28 -5
  52. package/build/types/tree/green/SyntaxToCode.d.ts +1 -0
  53. package/build/types/tree/green/Token.d.ts +4 -3
  54. package/build/types/tree/red/Nodes.d.ts +26 -8
  55. package/build/types/tree/red/Token.d.ts +3 -2
  56. package/build/types/types/TypeMembers.d.ts +20 -29
  57. package/package.json +3 -3
  58. package/build/types/analysis/BuiltInOperators.d.ts +0 -14
  59. package/build/types/common/UriTree.d.ts +0 -41
  60. package/build/types/entities/BinaryOperatorEntity.d.ts +0 -54
  61. package/build/types/entities/UnaryOperatorEntity.d.ts +0 -37
  62. package/build/types/parser/OperatorDictionary.d.ts +0 -11
@@ -52,108 +52,109 @@ export declare enum NodeKind {
52
52
  TypeDereferencedVariableGetterDeclaration = 50,
53
53
  TypeDereferencedVariableSetterDeclaration = 51,
54
54
  TypeMethodDeclaration = 52,
55
- TypeVariableDeclaration = 53,
56
- TypeVariableGetterDeclaration = 54,
57
- TypeVariableSetterDeclaration = 55,
58
- InvalidTypeMemberDeclaration = 56,
59
- NestedMethodDeclaration = 57,
60
- LocalVariableDeclaration = 58,
61
- EnumerationVariableDeclaration = 59,
62
- ArrayLiteral = 60,
63
- ArrayLiteralElementList = 61,
64
- AssertionExpression = 62,
65
- AssumptionExpression = 63,
66
- AsExpression = 64,
67
- BinaryExpression = 65,
68
- MethodBlockLiteral = 66,
69
- CallArgumentList = 67,
70
- CallExpression = 68,
71
- AutotypeCallExpression = 69,
72
- IndexedAccessArgumentList = 70,
73
- IndexedAccessExpression = 71,
74
- InvalidExpression = 72,
75
- IsExpression = 73,
76
- NotExpression = 74,
77
- MethodLiteral = 75,
78
- ParenthesizedExpression = 76,
79
- WhenTernaryExpression = 77,
80
- PrefixUnaryExpression = 78,
81
- PropertyAccessExpression = 79,
82
- ReferenceExpression = 80,
83
- DereferenceExpression = 81,
84
- TextTemplateLiteral = 82,
85
- TextTemplateSpanList = 83,
86
- TextTemplateSpan = 84,
87
- TokenExpression = 85,
88
- KeywordExpression = 86,
89
- ObjectExpression = 87,
90
- BaseExpression = 88,
91
- IdentifierExpression = 89,
92
- GenericSpecializationExpression = 90,
93
- DefaultMatchExpression = 91,
94
- AssignmentStatement = 92,
95
- StatementList = 93,
96
- StatementBlock = 94,
97
- BreakLoopStatement = 95,
98
- ContinueLoopStatement = 96,
99
- DisposeStatement = 97,
100
- RunStatementClauseList = 98,
101
- RunStatement = 99,
102
- OnErrorClause = 100,
103
- ErrorVariableDeclaration = 101,
104
- FinallyClause = 102,
105
- EmptyStatement = 103,
106
- ErrorStatement = 104,
107
- ExpressionStatement = 105,
108
- EnumerationVariableList = 106,
109
- ForStatement = 107,
110
- IfStatement = 108,
111
- ElseIfClauseList = 109,
112
- ElseIfClause = 110,
113
- InvalidStatement = 111,
114
- NestedMethodDeclarationStatement = 112,
115
- LocalVariableDeclarationStatement = 113,
116
- LoopStatement = 114,
117
- ReturnStatement = 115,
118
- CaseClauseList = 116,
119
- SwitchStatement = 117,
120
- MatchExpressionList = 118,
121
- SwitchStatementCaseClause = 119,
122
- WhileStatement = 120,
123
- YieldStatement = 121,
124
- TranslationParameterList = 122,
125
- TranslationParameterClause = 123,
126
- ConstructorTranslation = 124,
127
- IndexerTranslationParameterClause = 125,
128
- IndexerTranslation = 126,
129
- TranslationTypeParameterList = 127,
130
- TranslationTypeParameterClause = 128,
131
- PackageMethodTranslation = 129,
132
- TypeMethodTranslation = 130,
133
- MethodTypeTranslation = 131,
134
- PackageImportTranslation = 132,
135
- QualifiedName = 133,
136
- PackageVariableTranslation = 134,
137
- TypeVariableOrVariantTranslation = 135,
138
- TypeMemberTranslationList = 136,
139
- TypeTranslation = 137,
140
- TextLiteralTranslation = 138,
141
- TextTemplateLiteralTranslation = 139,
142
- VariantDeclaration = 140,
143
- TypeParameterDeclaration = 141,
144
- ParameterDeclaration = 142,
145
- CallArgument = 143,
146
- TagList = 144,
147
- Tag = 145,
148
- ModifierList = 146,
149
- Modifier = 147,
150
- ParameterClause = 148,
151
- ParameterList = 149,
152
- SetterParameterClause = 150,
153
- SetterParameterDeclaration = 151,
154
- TypeArgumentClause = 152,
155
- TypeArgumentList = 153,
156
- TypeParameterClause = 154,
157
- TypeParameterList = 155,
158
- TypeAnnotation = 156
55
+ OperatorDeclaration = 53,
56
+ TypeVariableDeclaration = 54,
57
+ TypeVariableGetterDeclaration = 55,
58
+ TypeVariableSetterDeclaration = 56,
59
+ InvalidTypeMemberDeclaration = 57,
60
+ NestedMethodDeclaration = 58,
61
+ LocalVariableDeclaration = 59,
62
+ EnumerationVariableDeclaration = 60,
63
+ ArrayLiteral = 61,
64
+ ArrayLiteralElementList = 62,
65
+ AssertionExpression = 63,
66
+ AssumptionExpression = 64,
67
+ AsExpression = 65,
68
+ BinaryExpression = 66,
69
+ MethodBlockLiteral = 67,
70
+ CallArgumentList = 68,
71
+ CallExpression = 69,
72
+ AutotypeCallExpression = 70,
73
+ IndexedAccessArgumentList = 71,
74
+ IndexedAccessExpression = 72,
75
+ InvalidExpression = 73,
76
+ IsExpression = 74,
77
+ NotExpression = 75,
78
+ MethodLiteral = 76,
79
+ ParenthesizedExpression = 77,
80
+ WhenTernaryExpression = 78,
81
+ PrefixUnaryExpression = 79,
82
+ PropertyAccessExpression = 80,
83
+ ReferenceExpression = 81,
84
+ DereferenceExpression = 82,
85
+ TextTemplateLiteral = 83,
86
+ TextTemplateSpanList = 84,
87
+ TextTemplateSpan = 85,
88
+ TokenExpression = 86,
89
+ KeywordExpression = 87,
90
+ ObjectExpression = 88,
91
+ BaseExpression = 89,
92
+ IdentifierExpression = 90,
93
+ GenericSpecializationExpression = 91,
94
+ DefaultMatchExpression = 92,
95
+ AssignmentStatement = 93,
96
+ StatementList = 94,
97
+ StatementBlock = 95,
98
+ BreakLoopStatement = 96,
99
+ ContinueLoopStatement = 97,
100
+ DisposeStatement = 98,
101
+ RunStatementClauseList = 99,
102
+ RunStatement = 100,
103
+ OnErrorClause = 101,
104
+ ErrorVariableDeclaration = 102,
105
+ FinallyClause = 103,
106
+ EmptyStatement = 104,
107
+ ErrorStatement = 105,
108
+ ExpressionStatement = 106,
109
+ EnumerationVariableList = 107,
110
+ ForStatement = 108,
111
+ IfStatement = 109,
112
+ ElseIfClauseList = 110,
113
+ ElseIfClause = 111,
114
+ InvalidStatement = 112,
115
+ NestedMethodDeclarationStatement = 113,
116
+ LocalVariableDeclarationStatement = 114,
117
+ LoopStatement = 115,
118
+ ReturnStatement = 116,
119
+ CaseClauseList = 117,
120
+ SwitchStatement = 118,
121
+ MatchExpressionList = 119,
122
+ SwitchStatementCaseClause = 120,
123
+ WhileStatement = 121,
124
+ YieldStatement = 122,
125
+ TranslationParameterList = 123,
126
+ TranslationParameterClause = 124,
127
+ ConstructorTranslation = 125,
128
+ IndexerTranslationParameterClause = 126,
129
+ IndexerTranslation = 127,
130
+ TranslationTypeParameterList = 128,
131
+ TranslationTypeParameterClause = 129,
132
+ PackageMethodTranslation = 130,
133
+ TypeMethodTranslation = 131,
134
+ MethodTypeTranslation = 132,
135
+ PackageImportTranslation = 133,
136
+ QualifiedName = 134,
137
+ PackageVariableTranslation = 135,
138
+ TypeVariableOrVariantTranslation = 136,
139
+ TypeMemberTranslationList = 137,
140
+ TypeTranslation = 138,
141
+ TextLiteralTranslation = 139,
142
+ TextTemplateLiteralTranslation = 140,
143
+ VariantDeclaration = 141,
144
+ TypeParameterDeclaration = 142,
145
+ ParameterDeclaration = 143,
146
+ CallArgument = 144,
147
+ TagList = 145,
148
+ Tag = 146,
149
+ ModifierList = 147,
150
+ Modifier = 148,
151
+ ParameterClause = 149,
152
+ ParameterList = 150,
153
+ SetterParameterClause = 151,
154
+ SetterParameterDeclaration = 152,
155
+ TypeArgumentClause = 153,
156
+ TypeArgumentList = 154,
157
+ TypeParameterClause = 155,
158
+ TypeParameterList = 156,
159
+ TypeAnnotation = 157
159
160
  }
@@ -1,8 +1,9 @@
1
+ import { KeywordKind } from './KeywordKind.js';
1
2
  export declare enum OperatorKind {
2
3
  Plus = 0,// Одноместный или двухместный.
3
4
  Minus = 1,// Одноместный или двухместный.
4
5
  Not = 2,
5
- ImplicitConversion = 3,
6
+ BitwiseNot = 3,
6
7
  Multiply = 4,
7
8
  Divide = 5,
8
9
  IntegerDivide = 6,
@@ -14,10 +15,26 @@ export declare enum OperatorKind {
14
15
  Or = 12,
15
16
  And = 13,
16
17
  Xor = 14,
17
- AddEquals = 15,
18
- SubtractEquals = 16,
19
- MultiplyEquals = 17,
20
- DivideEquals = 18,
21
- IntegerDivideEquals = 19,
22
- ModuloEquals = 20
18
+ BitwiseAnd = 15,
19
+ BitwiseOr = 16,
20
+ BitwiseXor = 17
23
21
  }
22
+ export declare const operatorKinds: readonly [OperatorKind.Plus, OperatorKind.Minus, OperatorKind.Not, OperatorKind.BitwiseNot, OperatorKind.Multiply, OperatorKind.Divide, OperatorKind.IntegerDivide, OperatorKind.Modulo, OperatorKind.LessThan, OperatorKind.GreaterThan, OperatorKind.LessThanEquals, OperatorKind.GreaterThanEquals, OperatorKind.Or, OperatorKind.And, OperatorKind.Xor, OperatorKind.BitwiseAnd, OperatorKind.BitwiseOr, OperatorKind.BitwiseXor];
23
+ /**
24
+ * Виды операторов, задаваемых токенами (`+`, `-`, `*=` и др.).
25
+ */
26
+ export type KindOfOperatorDefinedByToken = OperatorKind.BitwiseNot | OperatorKind.Plus | OperatorKind.Minus | OperatorKind.Multiply | OperatorKind.Divide | OperatorKind.IntegerDivide | OperatorKind.Modulo | OperatorKind.LessThan | OperatorKind.GreaterThan | OperatorKind.LessThanEquals | OperatorKind.GreaterThanEquals | OperatorKind.BitwiseAnd | OperatorKind.BitwiseOr | OperatorKind.BitwiseXor;
27
+ export declare function isOperatorDefinedByToken(kind: OperatorKind): kind is KindOfOperatorDefinedByToken;
28
+ /**
29
+ * Виды операторов, задаваемых ключевыми словами (`и`, `или`, `не` и др.)
30
+ */
31
+ export type KindOfOperatorDefinedByKeyword = OperatorKind.Not | OperatorKind.Or | OperatorKind.And | OperatorKind.Xor;
32
+ export declare function isOperatorDefinedByKeyword(kind: OperatorKind): kind is KindOfOperatorDefinedByKeyword;
33
+ export declare const tokenTextByOperatorKind: {
34
+ [T in KindOfOperatorDefinedByToken]: string;
35
+ };
36
+ export declare const operatorKindByTokenText: Record<string, KindOfOperatorDefinedByToken | undefined>;
37
+ export declare const keywordKindByOperatorKind: {
38
+ [T in KindOfOperatorDefinedByKeyword]: KeywordKind;
39
+ };
40
+ export declare const operatorKindByKeywordKind: Record<number, KindOfOperatorDefinedByKeyword | undefined>;
@@ -1,5 +1,5 @@
1
1
  import { ParserDiagnostic } from '../../parser/ParserDiagnostic.js';
2
- import { KeywordKind, NodeKind, TokenKind } from '../index.js';
2
+ import { KeywordKind, NodeKind, OperatorKind, TokenKind } from '../index.js';
3
3
  import * as red from '../red/index.js';
4
4
  import { BaseNode } from './BaseNode.js';
5
5
  import { Token } from './Token.js';
@@ -38,7 +38,7 @@ export declare class Keyword<TKind extends KeywordKind = KeywordKind> extends Ba
38
38
  readonly children: readonly Identifier[];
39
39
  get tokens(): readonly Identifier[];
40
40
  protected get thisAsNode(): Node;
41
- constructor(keywordKind: TKind, tokens: readonly Identifier[], isMissing?: boolean);
41
+ constructor(tokens: readonly Identifier[], keywordKind: TKind, isMissing?: boolean);
42
42
  toRed(rangeStart: number, parent: red.KeywordParent): red.Keyword<TKind>;
43
43
  }
44
44
  export type PackageImportDirectiveListElement = PackageImportDirective | Semicolon;
@@ -614,7 +614,7 @@ export declare class InvalidPackageMemberDeclaration extends BaseNode {
614
614
  constructor(tagList: TagList, modifierList: ModifierList);
615
615
  toRed(rangeStart: number, parent: red.InvalidPackageMemberDeclarationParent): red.InvalidPackageMemberDeclaration;
616
616
  }
617
- export type TypeMemberDeclaration = TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | VariantDeclaration | TypeMethodDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMemberGroupDeclaration | InvalidTypeMemberDeclaration;
617
+ export type TypeMemberDeclaration = TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | VariantDeclaration | TypeMethodDeclaration | OperatorDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMemberGroupDeclaration | InvalidTypeMemberDeclaration;
618
618
  export declare class TypeMemberGroupDeclaration extends BaseNode {
619
619
  readonly kind = NodeKind.TypeMemberGroupDeclaration;
620
620
  readonly children: readonly [
@@ -783,6 +783,29 @@ export declare class TypeMethodDeclaration extends BaseNode {
783
783
  constructor(tagList: TagList, modifierList: ModifierList, functionKeyword: Keyword<KeywordKind.Function>, name: Identifier, typeParameterClause: TypeParameterClause | undefined, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, body: StatementBlock | undefined);
784
784
  toRed(rangeStart: number, parent: red.TypeMemberDeclarationParent): red.TypeMethodDeclaration;
785
785
  }
786
+ export declare class OperatorDeclaration extends BaseNode {
787
+ readonly operatorKind: OperatorKind;
788
+ readonly kind = NodeKind.OperatorDeclaration;
789
+ readonly children: readonly [
790
+ TagList,
791
+ ModifierList,
792
+ Keyword<KeywordKind.Function>,
793
+ Identifier,
794
+ ParameterClause,
795
+ TypeAnnotation | undefined,
796
+ StatementBlock | undefined
797
+ ];
798
+ get tagList(): TagList;
799
+ get modifierList(): ModifierList;
800
+ get functionKeyword(): Keyword<KeywordKind.Function>;
801
+ get name(): Identifier;
802
+ get parameterClause(): ParameterClause;
803
+ get returnTypeAnnotation(): TypeAnnotation | undefined;
804
+ get body(): StatementBlock | undefined;
805
+ protected get thisAsNode(): Node;
806
+ constructor(tagList: TagList, modifierList: ModifierList, functionKeyword: Keyword<KeywordKind.Function>, name: Identifier, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, body: StatementBlock | undefined, operatorKind: OperatorKind);
807
+ toRed(rangeStart: number, parent: red.TypeMemberDeclarationParent): red.OperatorDeclaration;
808
+ }
786
809
  export declare class TypeVariableDeclaration extends BaseNode {
787
810
  readonly kind = NodeKind.TypeVariableDeclaration;
788
811
  readonly children: readonly [
@@ -1157,7 +1180,7 @@ export declare class PrefixUnaryExpression extends BaseNode {
1157
1180
  constructor(operator: PrefixUnaryExpressionOperator, operand: Expression);
1158
1181
  toRed(rangeStart: number, parent: red.ExpressionParent): red.PrefixUnaryExpression;
1159
1182
  }
1160
- export type PrefixUnaryExpressionOperator = Token<TokenKind.Plus> | Token<TokenKind.Minus> | Token<TokenKind.Exclamation>;
1183
+ export type PrefixUnaryExpressionOperator = Token<TokenKind.Plus> | Token<TokenKind.Minus>;
1161
1184
  export declare class PropertyAccessExpression extends BaseNode {
1162
1185
  readonly kind = NodeKind.PropertyAccessExpression;
1163
1186
  readonly children: readonly [
@@ -2176,4 +2199,4 @@ export declare class TypeAnnotation extends BaseNode {
2176
2199
  constructor(colonToken: Token<TokenKind.Colon>, typeSpecifier: TypeSpecifier);
2177
2200
  toRed(rangeStart: number, parent: red.TypeAnnotationParent): red.TypeAnnotation;
2178
2201
  }
2179
- export type Node = SourceFile | PackageMemberDeclarationList | Keyword | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackagePath | NamedTypeSpecifier | UnionTypeSpecifier | UnionTypeSpecifierTypeList | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | InvalidTypeSpecifier | AnonymousMethodTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | TopLevelTranslationList | TranslationsDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageMethodDeclaration | PackageMethodTypeDeclaration | MethodTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | InvalidPackageMemberDeclaration | TypeMemberGroupDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeIndexerParameterClause | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | InvalidTypeMemberDeclaration | NestedMethodDeclaration | LocalVariableDeclaration | EnumerationVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | MethodBlockLiteral | CallArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessArgumentList | IndexedAccessExpression | InvalidExpression | IsExpression | NotExpression | MethodLiteral | ParenthesizedExpression | WhenTernaryExpression | PrefixUnaryExpression | PropertyAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatementClauseList | RunStatement | OnErrorClause | ErrorVariableDeclaration | FinallyClause | EmptyStatement | ErrorStatement | ExpressionStatement | EnumerationVariableList | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | InvalidStatement | NestedMethodDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | SwitchStatementCaseClause | WhileStatement | YieldStatement | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexerTranslationParameterClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageMethodTranslation | TypeMethodTranslation | MethodTypeTranslation | PackageImportTranslation | QualifiedName | PackageVariableTranslation | TypeVariableOrVariantTranslation | TypeMemberTranslationList | TypeTranslation | TextLiteralTranslation | TextTemplateLiteralTranslation | VariantDeclaration | TypeParameterDeclaration | ParameterDeclaration | CallArgument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | SetterParameterClause | SetterParameterDeclaration | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation | Token;
2202
+ export type Node = SourceFile | PackageMemberDeclarationList | Keyword | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackagePath | NamedTypeSpecifier | UnionTypeSpecifier | UnionTypeSpecifierTypeList | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | InvalidTypeSpecifier | AnonymousMethodTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | TopLevelTranslationList | TranslationsDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageMethodDeclaration | PackageMethodTypeDeclaration | MethodTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | InvalidPackageMemberDeclaration | TypeMemberGroupDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeIndexerParameterClause | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | OperatorDeclaration | TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | InvalidTypeMemberDeclaration | NestedMethodDeclaration | LocalVariableDeclaration | EnumerationVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | MethodBlockLiteral | CallArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessArgumentList | IndexedAccessExpression | InvalidExpression | IsExpression | NotExpression | MethodLiteral | ParenthesizedExpression | WhenTernaryExpression | PrefixUnaryExpression | PropertyAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatementClauseList | RunStatement | OnErrorClause | ErrorVariableDeclaration | FinallyClause | EmptyStatement | ErrorStatement | ExpressionStatement | EnumerationVariableList | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | InvalidStatement | NestedMethodDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | SwitchStatementCaseClause | WhileStatement | YieldStatement | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexerTranslationParameterClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageMethodTranslation | TypeMethodTranslation | MethodTypeTranslation | PackageImportTranslation | QualifiedName | PackageVariableTranslation | TypeVariableOrVariantTranslation | TypeMemberTranslationList | TypeTranslation | TextLiteralTranslation | TextTemplateLiteralTranslation | VariantDeclaration | TypeParameterDeclaration | ParameterDeclaration | CallArgument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | SetterParameterClause | SetterParameterDeclaration | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation | Token;
@@ -41,6 +41,7 @@ export declare class SyntaxToCode {
41
41
  private writeTypeVariableGetterDeclaration;
42
42
  private writeTypeVariableSetterDeclaration;
43
43
  private writeTypeMethodDeclaration;
44
+ private writeOperatorDeclaration;
44
45
  private writeTypeConstructorDeclaration;
45
46
  private writeTypeDestructorDeclaration;
46
47
  private writeTypeIndexedGetterDeclaration;
@@ -8,9 +8,10 @@ export declare const enum TokenFlags {
8
8
  OriginalName = 2,// ~имя
9
9
  QuotedName = 4,// 'имя', 'имя с пробелами', '+'
10
10
  RequiresQuotes = 8,// 'имя с пробелами', '+'
11
- EscapedKeyword = 16,// выполнить`
12
- ConflictResolvingParameterName = 32,// имя`, выполнить``
13
- BackingVariableName = 64
11
+ EscapedKeyword = 16,// 'выполнить'
12
+ HasBackQuotes = 32,// Имя с любым количеством апострофов: имя`, имя```
13
+ ConflictResolvingParameterName = 64,// Имя с одним апострофом: имя`, выполнить`
14
+ BackingVariableName = 128
14
15
  }
15
16
  export declare class Token<TKind extends TokenKind = TokenKind> extends BaseNode {
16
17
  readonly kind = NodeKind.Token;
@@ -1,7 +1,7 @@
1
1
  import { Query } from '../../common/index.js';
2
2
  import { ParserDiagnostic } from '../../parser/ParserDiagnostic.js';
3
3
  import * as green from '../green/index.js';
4
- import { KeywordKind, NodeKind, TokenKind } from '../index.js';
4
+ import { KeywordKind, NodeKind, OperatorKind, TokenKind } from '../index.js';
5
5
  import { BaseNode } from './BaseNode.js';
6
6
  import { Token } from './Token.js';
7
7
  export declare class SourceFile extends BaseNode {
@@ -32,7 +32,7 @@ export declare class PackageMemberDeclarationList extends BaseNode {
32
32
  constructor(green: green.PackageMemberDeclarationList, rangeStart: number, parent: PackageMemberDeclarationListParent);
33
33
  private createChildren;
34
34
  }
35
- export type IdentifierParent = PackageImport | PackagePath | PackageAliasTypeDeclaration | PackageMethodDeclaration | PackageMethodTypeDeclaration | PackageStructuredTypeDeclaration | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | TypeMethodDeclaration | TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | NestedMethodDeclaration | LocalVariableDeclaration | EnumerationVariableDeclaration | ErrorVariableDeclaration | PropertyAccessExpression | IdentifierExpression | TranslationParameterList | TranslationTypeParameterList | PackageMethodTranslation | TypeMethodTranslation | MethodTypeTranslation | QualifiedName | PackageVariableTranslation | TypeVariableOrVariantTranslation | TypeTranslation | VariantDeclaration | TypeParameterDeclaration | ParameterDeclaration | SetterParameterDeclaration | CallArgument | Keyword;
35
+ export type IdentifierParent = PackageImport | PackagePath | PackageAliasTypeDeclaration | PackageMethodDeclaration | PackageMethodTypeDeclaration | PackageStructuredTypeDeclaration | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | TypeMethodDeclaration | OperatorDeclaration | TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | NestedMethodDeclaration | LocalVariableDeclaration | EnumerationVariableDeclaration | ErrorVariableDeclaration | PropertyAccessExpression | IdentifierExpression | TranslationParameterList | TranslationTypeParameterList | PackageMethodTranslation | TypeMethodTranslation | MethodTypeTranslation | QualifiedName | PackageVariableTranslation | TypeVariableOrVariantTranslation | TypeTranslation | VariantDeclaration | TypeParameterDeclaration | ParameterDeclaration | SetterParameterDeclaration | CallArgument | Keyword;
36
36
  export type Identifier = Token<TokenKind.Identifier>;
37
37
  export type Comma = Token<TokenKind.Comma>;
38
38
  export type Semicolon = Token<TokenKind.Semicolon>;
@@ -616,7 +616,7 @@ export declare class InvalidPackageMemberDeclaration extends BaseNode {
616
616
  constructor(green: green.InvalidPackageMemberDeclaration, rangeStart: number, parent: InvalidPackageMemberDeclarationParent);
617
617
  private createChildren;
618
618
  }
619
- export type TypeMemberDeclaration = TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | VariantDeclaration | TypeMethodDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMemberGroupDeclaration | InvalidTypeMemberDeclaration;
619
+ export type TypeMemberDeclaration = TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | VariantDeclaration | TypeMethodDeclaration | OperatorDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMemberGroupDeclaration | InvalidTypeMemberDeclaration;
620
620
  export type TypeMemberDeclarationParent = TypeMemberDeclarationList;
621
621
  export declare class TypeMemberGroupDeclaration extends BaseNode {
622
622
  readonly kind = NodeKind.TypeMemberGroupDeclaration;
@@ -757,6 +757,24 @@ export declare class TypeMethodDeclaration extends BaseNode {
757
757
  constructor(green: green.TypeMethodDeclaration, rangeStart: number, parent: TypeMemberDeclarationParent);
758
758
  private createChildren;
759
759
  }
760
+ export declare class OperatorDeclaration extends BaseNode {
761
+ readonly kind = NodeKind.OperatorDeclaration;
762
+ readonly green: green.OperatorDeclaration;
763
+ readonly parent: TypeMemberDeclarationParent;
764
+ private _children;
765
+ get children(): readonly [TagList, ModifierList, Keyword<green.KeywordKind.Function>, Identifier, ParameterClause, TypeAnnotation | undefined, StatementBlock | undefined];
766
+ get tagList(): TagList;
767
+ get modifierList(): ModifierList;
768
+ get functionKeyword(): Keyword<KeywordKind.Function>;
769
+ get name(): Identifier;
770
+ get parameterClause(): ParameterClause;
771
+ get returnTypeAnnotation(): TypeAnnotation | undefined;
772
+ get body(): StatementBlock | undefined;
773
+ get operatorKind(): OperatorKind;
774
+ protected get thisAsNode(): Node;
775
+ constructor(green: green.OperatorDeclaration, rangeStart: number, parent: TypeMemberDeclarationParent);
776
+ private createChildren;
777
+ }
760
778
  export declare class TypeVariableDeclaration extends BaseNode {
761
779
  readonly kind = NodeKind.TypeVariableDeclaration;
762
780
  readonly green: green.TypeVariableDeclaration;
@@ -1114,7 +1132,7 @@ export declare class PrefixUnaryExpression extends BaseNode {
1114
1132
  constructor(green: green.PrefixUnaryExpression, rangeStart: number, parent: ExpressionParent);
1115
1133
  private createChildren;
1116
1134
  }
1117
- export type PrefixUnaryExpressionOperator = Token<TokenKind.Plus> | Token<TokenKind.Minus> | Token<TokenKind.Exclamation>;
1135
+ export type PrefixUnaryExpressionOperator = Token<TokenKind.Plus> | Token<TokenKind.Minus>;
1118
1136
  export declare class PropertyAccessExpression extends BaseNode {
1119
1137
  readonly kind = NodeKind.PropertyAccessExpression;
1120
1138
  readonly green: green.PropertyAccessExpression;
@@ -1305,7 +1323,7 @@ export declare class StatementList extends BaseNode {
1305
1323
  constructor(green: green.StatementList, rangeStart: number, parent: StatementListParent);
1306
1324
  private createChildren;
1307
1325
  }
1308
- export type StatementBlockParent = PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageMethodDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | NestedMethodDeclaration | MethodLiteral | MethodBlockLiteral | PackageConstructorDeclaration | PackageEntryPointDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | IfStatement | ElseIfClause | RunStatement | OnErrorClause | FinallyClause | ForStatement | LoopStatement | SwitchStatementCaseClause | WhileStatement;
1326
+ export type StatementBlockParent = PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageMethodDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | OperatorDeclaration | NestedMethodDeclaration | MethodLiteral | MethodBlockLiteral | PackageConstructorDeclaration | PackageEntryPointDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | IfStatement | ElseIfClause | RunStatement | OnErrorClause | FinallyClause | ForStatement | LoopStatement | SwitchStatementCaseClause | WhileStatement;
1309
1327
  export declare class StatementBlock extends BaseNode {
1310
1328
  readonly kind = NodeKind.StatementBlock;
1311
1329
  readonly green: green.StatementBlock;
@@ -2058,7 +2076,7 @@ export declare class Modifier extends BaseNode {
2058
2076
  export type ModifierKeyword = Keyword<ModifierKeywordKind>;
2059
2077
  export type ModifierKeywordKind = KeywordKind.Hidden | KeywordKind.Basic | KeywordKind.Static | KeywordKind.Redefinable | KeywordKind.Abstract | KeywordKind.Redefined | KeywordKind.Async | KeywordKind.Const;
2060
2078
  export type ModifierLevelKeyword = Keyword<KeywordKind.InType> | Keyword<KeywordKind.InHierarchy> | Keyword<KeywordKind.InFile> | Keyword<KeywordKind.InPackage>;
2061
- export type ParameterClauseParent = PackageMethodDeclaration | NestedMethodDeclaration | MethodLiteral | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeMethodDeclaration | MethodTypeDeclarationBody;
2079
+ export type ParameterClauseParent = PackageMethodDeclaration | NestedMethodDeclaration | MethodLiteral | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeMethodDeclaration | OperatorDeclaration | MethodTypeDeclarationBody;
2062
2080
  export declare class ParameterClause extends BaseNode {
2063
2081
  readonly kind = NodeKind.ParameterClause;
2064
2082
  readonly green: green.ParameterClause;
@@ -2169,7 +2187,7 @@ export declare class TypeParameterList extends BaseNode {
2169
2187
  constructor(green: green.TypeParameterList, rangeStart: number, parent: TypeParameterListParent);
2170
2188
  private createChildren;
2171
2189
  }
2172
- export type TypeAnnotationParent = PackageMethodDeclaration | MethodTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | NestedMethodDeclaration | LocalVariableDeclaration | MethodLiteral | ParameterDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | ErrorVariableDeclaration | SetterParameterDeclaration;
2190
+ export type TypeAnnotationParent = PackageMethodDeclaration | MethodTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | NestedMethodDeclaration | LocalVariableDeclaration | MethodLiteral | ParameterDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | OperatorDeclaration | TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | ErrorVariableDeclaration | SetterParameterDeclaration;
2173
2191
  export declare class TypeAnnotation extends BaseNode {
2174
2192
  readonly kind = NodeKind.TypeAnnotation;
2175
2193
  readonly green: green.TypeAnnotation;
@@ -2182,4 +2200,4 @@ export declare class TypeAnnotation extends BaseNode {
2182
2200
  constructor(green: green.TypeAnnotation, rangeStart: number, parent: TypeAnnotationParent);
2183
2201
  private createChildren;
2184
2202
  }
2185
- export type Node = SourceFile | PackageMemberDeclarationList | Keyword | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackagePath | NamedTypeSpecifier | UnionTypeSpecifier | UnionTypeSpecifierTypeList | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | InvalidTypeSpecifier | AnonymousMethodTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | TopLevelTranslationList | TranslationsDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageMethodDeclaration | PackageMethodTypeDeclaration | MethodTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | InvalidPackageMemberDeclaration | TypeMemberGroupDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeIndexerParameterClause | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | InvalidTypeMemberDeclaration | NestedMethodDeclaration | LocalVariableDeclaration | EnumerationVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | MethodBlockLiteral | CallArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessArgumentList | IndexedAccessExpression | InvalidExpression | IsExpression | NotExpression | MethodLiteral | ParenthesizedExpression | WhenTernaryExpression | PrefixUnaryExpression | PropertyAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatementClauseList | RunStatement | OnErrorClause | ErrorVariableDeclaration | FinallyClause | EmptyStatement | ErrorStatement | ExpressionStatement | EnumerationVariableList | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | InvalidStatement | NestedMethodDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | SwitchStatementCaseClause | WhileStatement | YieldStatement | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexerTranslationParameterClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageMethodTranslation | TypeMethodTranslation | MethodTypeTranslation | PackageImportTranslation | QualifiedName | PackageVariableTranslation | TypeVariableOrVariantTranslation | TypeMemberTranslationList | TypeTranslation | TextLiteralTranslation | TextTemplateLiteralTranslation | VariantDeclaration | TypeParameterDeclaration | ParameterDeclaration | CallArgument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | SetterParameterClause | SetterParameterDeclaration | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation | Token;
2203
+ export type Node = SourceFile | PackageMemberDeclarationList | Keyword | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackagePath | NamedTypeSpecifier | UnionTypeSpecifier | UnionTypeSpecifierTypeList | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | InvalidTypeSpecifier | AnonymousMethodTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | TopLevelTranslationList | TranslationsDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageMethodDeclaration | PackageMethodTypeDeclaration | MethodTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | InvalidPackageMemberDeclaration | TypeMemberGroupDeclaration | TypeConstructorDeclaration | TypeDestructorDeclaration | TypeIndexedGetterDeclaration | TypeIndexedSetterDeclaration | TypeIndexerParameterClause | TypeDereferencedVariableGetterDeclaration | TypeDereferencedVariableSetterDeclaration | TypeMethodDeclaration | OperatorDeclaration | TypeVariableDeclaration | TypeVariableGetterDeclaration | TypeVariableSetterDeclaration | InvalidTypeMemberDeclaration | NestedMethodDeclaration | LocalVariableDeclaration | EnumerationVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | MethodBlockLiteral | CallArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessArgumentList | IndexedAccessExpression | InvalidExpression | IsExpression | NotExpression | MethodLiteral | ParenthesizedExpression | WhenTernaryExpression | PrefixUnaryExpression | PropertyAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatementClauseList | RunStatement | OnErrorClause | ErrorVariableDeclaration | FinallyClause | EmptyStatement | ErrorStatement | ExpressionStatement | EnumerationVariableList | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | InvalidStatement | NestedMethodDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | SwitchStatementCaseClause | WhileStatement | YieldStatement | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexerTranslationParameterClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageMethodTranslation | TypeMethodTranslation | MethodTypeTranslation | PackageImportTranslation | QualifiedName | PackageVariableTranslation | TypeVariableOrVariantTranslation | TypeMemberTranslationList | TypeTranslation | TextLiteralTranslation | TextTemplateLiteralTranslation | VariantDeclaration | TypeParameterDeclaration | ParameterDeclaration | CallArgument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | SetterParameterClause | SetterParameterDeclaration | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation | Token;
@@ -1,8 +1,8 @@
1
- import { Node, NodeKind, TokenFlags } from './index.js';
2
- import { TokenKind, TriviaKind } from '../index.js';
3
1
  import { Range } from '../../common/index.js';
4
2
  import * as green from '../green/index.js';
3
+ import { TokenKind, TriviaKind } from '../index.js';
5
4
  import { BaseNode } from './BaseNode.js';
5
+ import { Node, NodeKind, OperatorKind, TokenFlags } from './index.js';
6
6
  export type TokenParent = Node;
7
7
  export declare class Token<TKind extends TokenKind = TokenKind> extends BaseNode {
8
8
  readonly kind = NodeKind.Token;
@@ -13,6 +13,7 @@ export declare class Token<TKind extends TokenKind = TokenKind> extends BaseNode
13
13
  get value(): string;
14
14
  get flags(): TokenFlags;
15
15
  get isMissing(): boolean;
16
+ get ifOperatorNameThenKind(): OperatorKind | undefined;
16
17
  get rangeWithoutTrivia(): Range;
17
18
  protected get thisAsNode(): Node;
18
19
  constructor(green: green.Token<TKind>, rangeStart: number, parent: TokenParent);
@@ -1,10 +1,10 @@
1
1
  import { Analyzer } from '../analysis/index.js';
2
2
  import { Name } from '../common/index.js';
3
- import { BinaryOperatorEntity, BinaryOperatorKind, ConstructorEntity, DestructorEntity, EntityHidingLevel, IndexerEntity, ParameterVariableEntity, DereferenceOperatorEntity, TypeMethodEntity, TypeParameterEntity, TypeVariableEntity, UnaryOperatorEntity, UnaryOperatorKind } from '../entities/index.js';
3
+ import { ConstructorEntity, DereferenceOperatorEntity, DestructorEntity, EntityHidingLevel, IndexerEntity, OperatorEntity, OperatorKind, ParameterVariableEntity, TypeMethodEntity, TypeParameterEntity, TypeVariableEntity } from '../entities/index.js';
4
4
  import { MethodType } from './MethodType.js';
5
5
  import { Substitutions } from './Substitutions.js';
6
6
  import { Type } from './Type.js';
7
- export type TypeMember = Variable | Method | Constructor | Destructor | Indexer | DereferenceOperator | BinaryOperator | UnaryOperator;
7
+ export type TypeMember = Variable | Method | Operator | Constructor | Destructor | Indexer | DereferenceOperator;
8
8
  export type NamedTypeMember = Variable | Method;
9
9
  export declare class Method implements ITypeMember {
10
10
  private readonly _analyzer;
@@ -52,6 +52,24 @@ export declare class Variable implements ITypeMember {
52
52
  isStatic(): boolean;
53
53
  applySubstitutions(substitutions: Substitutions): Variable;
54
54
  }
55
+ export declare class Operator implements ITypeMember {
56
+ private readonly _analyzer;
57
+ private readonly _entity;
58
+ private readonly _substitutions;
59
+ readonly kind = "operator";
60
+ private readonly _valueParameters;
61
+ private readonly _signatureEntity;
62
+ constructor(_analyzer: Analyzer, _entity: OperatorEntity, _substitutions: Substitutions);
63
+ getOperatorKind(): OperatorKind;
64
+ getValueParameters(): readonly ValueParameter[];
65
+ getReturnType(): Type;
66
+ getEntity(): OperatorEntity;
67
+ getSubstitutions(): Substitutions;
68
+ getSignatureType(): MethodType;
69
+ isHidden(): EntityHidingLevel | undefined;
70
+ isStatic(): boolean;
71
+ applySubstitutions(substitutions: Substitutions): Operator;
72
+ }
55
73
  export declare class Constructor implements ITypeMember {
56
74
  private readonly _entity;
57
75
  private readonly _substitutions;
@@ -101,33 +119,6 @@ export declare class DereferenceOperator implements ITypeMember {
101
119
  isHidden(): EntityHidingLevel | undefined;
102
120
  applySubstitutions(substitutions: Substitutions): DereferenceOperator;
103
121
  }
104
- export declare class BinaryOperator implements ITypeMember {
105
- private readonly _entity;
106
- private readonly _substitutions;
107
- readonly kind = "binary-operator";
108
- constructor(_entity: BinaryOperatorEntity, _substitutions: Substitutions);
109
- getEntity(): BinaryOperatorEntity;
110
- getSubstitutions(): Substitutions;
111
- getOperatorKind(): BinaryOperatorKind;
112
- getLeftOperandType(): Type;
113
- getRightOperandType(): Type;
114
- getResultType(): Type;
115
- applySubstitutions(substitutions: Substitutions): BinaryOperator;
116
- isHidden(): EntityHidingLevel | undefined;
117
- }
118
- export declare class UnaryOperator implements ITypeMember {
119
- private readonly _entity;
120
- private readonly _substitutions;
121
- readonly kind = "unary-operator";
122
- constructor(_entity: UnaryOperatorEntity, _substitutions: Substitutions);
123
- getEntity(): UnaryOperatorEntity;
124
- getSubstitutions(): Substitutions;
125
- getOperatorKind(): UnaryOperatorKind;
126
- getOperandType(): Type;
127
- getResultType(): Type;
128
- applySubstitutions(substitutions: Substitutions): UnaryOperator;
129
- isHidden(): EntityHidingLevel | undefined;
130
- }
131
122
  export interface ITypeMember {
132
123
  isHidden(): EntityHidingLevel | undefined;
133
124
  getSubstitutions(): Substitutions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artel/artc",
3
- "version": "0.6.25211",
3
+ "version": "0.6.25213",
4
4
  "description": "Артель Компилятор | Artel Compiler",
5
5
  "author": "Nezaboodka Team <contact@nezaboodka.com>",
6
6
  "license": "LGPL-3.0-or-later",
@@ -42,14 +42,14 @@
42
42
  "@vscode/l10n": "0.0.18",
43
43
  "jsonc-parser": "3.3.1",
44
44
  "reactronic": "^0.92.25013",
45
- "typescript": "5.5.4",
45
+ "typescript": "5.8.2",
46
46
  "vscode-json-languageservice": "5.4.2",
47
47
  "vscode-languageserver": "9.0.1",
48
48
  "vscode-languageserver-textdocument": "1.0.11",
49
49
  "vscode-uri": "3.0.8"
50
50
  },
51
51
  "devDependencies": {
52
- "@vscode/l10n-dev": "0.0.31",
52
+ "@vscode/l10n-dev": "0.0.35",
53
53
  "ts-json-schema-generator": "2.3.0"
54
54
  },
55
55
  "scripts": {
@@ -1,14 +0,0 @@
1
- import { BinaryOperatorEntity, TypeEntity, UnaryOperatorEntity } from '../entities/index.js';
2
- import { Analyzer } from './index.js';
3
- export declare class BuiltInOperators {
4
- private readonly _analyzer;
5
- private readonly _unaryOperators;
6
- private readonly _binaryOperators;
7
- private get unaryOperators();
8
- private get binaryOperators();
9
- constructor(_analyzer: Analyzer);
10
- getUnaryOperators(entity: TypeEntity): readonly UnaryOperatorEntity[];
11
- getBinaryOperators(entity: TypeEntity): readonly BinaryOperatorEntity[];
12
- private createBuiltInUnaryOperators;
13
- private createBuiltInBinaryOperators;
14
- }