@artel/artc 0.6.25211 → 0.6.25212
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Cli.js +3 -3
- package/build/api/Api.js +20 -18
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +748 -485
- package/build/{chunk-Y3KGPV3L.js → chunk-DYVLHEXS.js} +10754 -10037
- package/build/{chunk-5BGDYCRQ.js → chunk-MRSDFDBD.js} +9 -8
- package/build/{chunk-EYLAO2SF.js → chunk-XGS3PSIF.js} +3 -3
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +3 -1
- package/build/types/analysis/Analyzer.d.ts +33 -15
- package/build/types/analysis/BaseExpressionMeaning.d.ts +8 -2
- package/build/types/analysis/CallExpressionMeaning.d.ts +6 -1
- package/build/types/analysis/DiagnosticCollector.d.ts +1 -0
- package/build/types/analysis/EntityLocalizationHelper.d.ts +3 -1
- package/build/types/analysis/IdentifierExpressionMeaning.d.ts +12 -4
- package/build/types/analysis/Lookup.d.ts +6 -2
- package/build/types/analysis/PrefixUnaryOperatorResolver.d.ts +1 -3
- package/build/types/analysis/PropertyAccessExpressionMeaning.d.ts +13 -4
- package/build/types/analysis/Scope.d.ts +17 -3
- package/build/types/analysis/SemanticContext.d.ts +18 -1
- package/build/types/analysis/SemanticContextBuilder.d.ts +2 -0
- package/build/types/analysis/StatementBlockScopeBuilder.d.ts +1 -0
- package/build/types/analysis/TypeMemberLookup.d.ts +3 -3
- package/build/types/analysis/UserDefinableBinaryOperatorResolver.d.ts +2 -2
- package/build/types/common/Cached.d.ts +1 -0
- package/build/types/common/Debug.d.ts +1 -1
- package/build/types/common/LocalizationHelper.d.ts +5 -2
- package/build/types/common/Uri.d.ts +11 -2
- package/build/types/common/index.d.ts +0 -1
- package/build/types/diagnostic/DiagnosticCode.d.ts +126 -115
- package/build/types/emitter/EmitterGeneratedDeclarationKind.d.ts +7 -0
- package/build/types/emitter/Entities.d.ts +1 -0
- package/build/types/emitter/EntityMap.d.ts +1 -2
- package/build/types/emitter/IrBuilder.d.ts +2 -0
- package/build/types/emitter/StatementTransformationResult.d.ts +3 -1
- package/build/types/emitter/ir/Nodes.d.ts +24 -22
- package/build/types/entities/OperatorEntity.d.ts +7 -9
- package/build/types/entities/OperatorKind.d.ts +19 -26
- package/build/types/entities/StructuredTypeEntity.d.ts +3 -3
- package/build/types/entities/TypeEntityMembers.d.ts +9 -14
- package/build/types/entities/TypeExtensionEntity.d.ts +0 -1
- package/build/types/entities/VariableEntity.d.ts +2 -2
- package/build/types/entities/index.d.ts +7 -12
- package/build/types/parser/Parser.d.ts +2 -2
- package/build/types/project/FileSystemTree.d.ts +1 -1
- package/build/types/services/CompletionService.d.ts +26 -20
- package/build/types/services/DisplayService.d.ts +42 -50
- package/build/types/services/NodeSemanticInfo.d.ts +6 -11
- package/build/types/services/SemanticTokensService.d.ts +4 -3
- package/build/types/tree/NodeKind.d.ts +105 -104
- package/build/types/tree/OperatorKind.d.ts +24 -7
- package/build/types/tree/green/Nodes.d.ts +28 -5
- package/build/types/tree/green/SyntaxToCode.d.ts +1 -0
- package/build/types/tree/green/Token.d.ts +4 -3
- package/build/types/tree/red/Nodes.d.ts +26 -8
- package/build/types/tree/red/Token.d.ts +3 -2
- package/build/types/types/TypeMembers.d.ts +20 -29
- package/package.json +3 -3
- package/build/types/analysis/BuiltInOperators.d.ts +0 -14
- package/build/types/common/UriTree.d.ts +0 -41
- package/build/types/entities/BinaryOperatorEntity.d.ts +0 -54
- package/build/types/entities/UnaryOperatorEntity.d.ts +0 -37
- 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
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
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
|
-
|
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
|
-
|
18
|
-
|
19
|
-
|
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(
|
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
|
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
|
-
|
13
|
-
|
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
|
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 {
|
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
|
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.
|
3
|
+
"version": "0.6.25212",
|
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.
|
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.
|
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
|
-
}
|