@artel/artc 0.6.25210 → 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 +26 -14
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +774 -526
- package/build/{chunk-3ORG7RXI.js → chunk-DYVLHEXS.js} +11186 -10587
- package/build/{chunk-CAQIZO5K.js → chunk-MRSDFDBD.js} +9 -8
- package/build/{chunk-HRQLSHI7.js → chunk-XGS3PSIF.js} +3 -3
- package/build/types/analysis/AnalyzedTranslationPackage.d.ts +3 -1
- package/build/types/analysis/Analyzer.d.ts +33 -16
- 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 +3 -0
- package/build/types/common/LocalizationHelper.d.ts +5 -2
- package/build/types/common/Logger.d.ts +1 -1
- 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/Transformer.d.ts +1 -1
- package/build/types/emitter/ir/Nodes.d.ts +38 -34
- package/build/types/entities/EntityHiding.d.ts +2 -2
- package/build/types/entities/OperatorEntity.d.ts +43 -0
- package/build/types/entities/OperatorKind.d.ts +56 -0
- 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 +3 -13
- package/build/types/entities/index.d.ts +10 -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 +47 -55
- package/build/types/services/NodeSemanticInfo.d.ts +6 -11
- package/build/types/services/SemanticTokensService.d.ts +4 -3
- package/build/types/tree/KeywordKind.d.ts +25 -29
- package/build/types/tree/NodeKind.d.ts +89 -92
- package/build/types/tree/OperatorKind.d.ts +40 -0
- package/build/types/tree/green/Nodes.d.ts +52 -85
- package/build/types/tree/green/SyntaxToCode.d.ts +1 -0
- package/build/types/tree/green/Token.d.ts +7 -5
- package/build/types/tree/green/index.d.ts +1 -0
- package/build/types/tree/index.d.ts +0 -3
- package/build/types/tree/red/Nodes.d.ts +44 -78
- package/build/types/tree/red/Token.d.ts +3 -2
- package/build/types/tree/red/index.d.ts +4 -0
- package/build/types/ts-interop/Entities.d.ts +0 -4
- package/build/types/types/TypeMembers.d.ts +20 -29
- package/package.json +6 -6
- package/build/types/analysis/BuiltInOperators.d.ts +0 -14
- package/build/types/common/UriTree.d.ts +0 -41
- package/build/types/emitter/IntrinsicEntities.d.ts +0 -118
- package/build/types/entities/BinaryOperatorEntity.d.ts +0 -51
- package/build/types/entities/UnaryOperatorEntity.d.ts +0 -36
- /package/build/types/emitter/{error-boundary.d.ts → ErrorBoundary.d.ts} +0 -0
@@ -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;
|
@@ -336,7 +336,7 @@ export declare class PackageMethodDeclaration extends BaseNode {
|
|
336
336
|
readonly children: readonly [
|
337
337
|
TagList,
|
338
338
|
ModifierList,
|
339
|
-
Keyword<KeywordKind.
|
339
|
+
Keyword<KeywordKind.Function>,
|
340
340
|
Identifier,
|
341
341
|
TypeParameterClause | undefined,
|
342
342
|
ParameterClause,
|
@@ -345,14 +345,14 @@ export declare class PackageMethodDeclaration extends BaseNode {
|
|
345
345
|
];
|
346
346
|
get tagList(): TagList;
|
347
347
|
get modifierList(): ModifierList;
|
348
|
-
get
|
348
|
+
get functionKeyword(): Keyword<KeywordKind.Function>;
|
349
349
|
get name(): Identifier;
|
350
350
|
get typeParameterClause(): TypeParameterClause | undefined;
|
351
351
|
get parameterClause(): ParameterClause;
|
352
352
|
get returnTypeAnnotation(): TypeAnnotation | undefined;
|
353
353
|
get body(): StatementBlock | undefined;
|
354
354
|
protected get thisAsNode(): Node;
|
355
|
-
constructor(tagList: TagList, modifierList: ModifierList,
|
355
|
+
constructor(tagList: TagList, modifierList: ModifierList, functionKeyword: Keyword<KeywordKind.Function>, name: Identifier, typeParameterClause: TypeParameterClause | undefined, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, body: StatementBlock | undefined);
|
356
356
|
toRed(rangeStart: number, parent: red.PackageMemberDeclarationParent): red.PackageMethodDeclaration;
|
357
357
|
}
|
358
358
|
export declare class PackageMethodTypeDeclaration extends BaseNode {
|
@@ -381,16 +381,16 @@ export declare class MethodTypeDeclarationBody extends BaseNode {
|
|
381
381
|
readonly kind = NodeKind.MethodTypeDeclarationBody;
|
382
382
|
readonly children: readonly [
|
383
383
|
Keyword<KeywordKind.Async> | undefined,
|
384
|
-
Keyword<KeywordKind.
|
384
|
+
Keyword<KeywordKind.Function>,
|
385
385
|
ParameterClause,
|
386
386
|
TypeAnnotation | undefined
|
387
387
|
];
|
388
388
|
get asyncKeyword(): Keyword<KeywordKind.Async> | undefined;
|
389
|
-
get
|
389
|
+
get functionKeyword(): Keyword<KeywordKind.Function>;
|
390
390
|
get parameterClause(): ParameterClause;
|
391
391
|
get returnTypeAnnotation(): TypeAnnotation | undefined;
|
392
392
|
protected get thisAsNode(): Node;
|
393
|
-
constructor(asyncKeyword: Keyword<KeywordKind.Async> | undefined,
|
393
|
+
constructor(asyncKeyword: Keyword<KeywordKind.Async> | undefined, functionKeyword: Keyword<KeywordKind.Function>, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined);
|
394
394
|
toRed(rangeStart: number, parent: red.MethodTypeDeclarationBodyParent): red.MethodTypeDeclarationBody;
|
395
395
|
}
|
396
396
|
export type BaseTypeListElement = NamedTypeSpecifier | Comma;
|
@@ -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 [
|
@@ -764,7 +764,7 @@ export declare class TypeMethodDeclaration extends BaseNode {
|
|
764
764
|
readonly children: readonly [
|
765
765
|
TagList,
|
766
766
|
ModifierList,
|
767
|
-
Keyword<KeywordKind.
|
767
|
+
Keyword<KeywordKind.Function>,
|
768
768
|
Identifier,
|
769
769
|
TypeParameterClause | undefined,
|
770
770
|
ParameterClause,
|
@@ -773,16 +773,39 @@ export declare class TypeMethodDeclaration extends BaseNode {
|
|
773
773
|
];
|
774
774
|
get tagList(): TagList;
|
775
775
|
get modifierList(): ModifierList;
|
776
|
-
get
|
776
|
+
get functionKeyword(): Keyword<KeywordKind.Function>;
|
777
777
|
get name(): Identifier;
|
778
778
|
get typeParameterClause(): TypeParameterClause | undefined;
|
779
779
|
get parameterClause(): ParameterClause;
|
780
780
|
get returnTypeAnnotation(): TypeAnnotation | undefined;
|
781
781
|
get body(): StatementBlock | undefined;
|
782
782
|
protected get thisAsNode(): Node;
|
783
|
-
constructor(tagList: TagList, modifierList: ModifierList,
|
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 [
|
@@ -859,7 +882,7 @@ export declare class NestedMethodDeclaration extends BaseNode {
|
|
859
882
|
readonly kind = NodeKind.NestedMethodDeclaration;
|
860
883
|
readonly children: readonly [
|
861
884
|
Keyword<KeywordKind.Async> | undefined,
|
862
|
-
Keyword<KeywordKind.
|
885
|
+
Keyword<KeywordKind.Function>,
|
863
886
|
Identifier,
|
864
887
|
TypeParameterClause | undefined,
|
865
888
|
ParameterClause,
|
@@ -867,14 +890,14 @@ export declare class NestedMethodDeclaration extends BaseNode {
|
|
867
890
|
StatementBlock
|
868
891
|
];
|
869
892
|
get asyncKeyword(): Keyword<KeywordKind.Async> | undefined;
|
870
|
-
get
|
893
|
+
get functionKeyword(): Keyword<KeywordKind.Function>;
|
871
894
|
get name(): Identifier;
|
872
895
|
get typeParameterClause(): TypeParameterClause | undefined;
|
873
896
|
get parameterClause(): ParameterClause;
|
874
897
|
get returnTypeAnnotation(): TypeAnnotation | undefined;
|
875
898
|
get body(): StatementBlock;
|
876
899
|
protected get thisAsNode(): Node;
|
877
|
-
constructor(asyncKeyword: Keyword<KeywordKind.Async> | undefined,
|
900
|
+
constructor(asyncKeyword: Keyword<KeywordKind.Async> | undefined, functionKeyword: Keyword<KeywordKind.Function>, name: Identifier, typeParameterClause: TypeParameterClause | undefined, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, body: StatementBlock);
|
878
901
|
toRed(rangeStart: number, parent: red.NestedMethodDeclarationParent): red.NestedMethodDeclaration;
|
879
902
|
}
|
880
903
|
export declare class LocalVariableDeclaration extends BaseNode {
|
@@ -905,7 +928,7 @@ export declare class EnumerationVariableDeclaration extends BaseNode {
|
|
905
928
|
constructor(name: Identifier);
|
906
929
|
toRed(rangeStart: number, parent: red.EnumerationVariableDeclarationParent): red.EnumerationVariableDeclaration;
|
907
930
|
}
|
908
|
-
export type Expression = ArrayLiteral | AsExpression | AssertionExpression | AssumptionExpression | BinaryExpression | MethodBlockLiteral | CallExpression | IdentifierExpression | AutotypeCallExpression | IndexedAccessExpression | InvalidExpression | IsExpression |
|
931
|
+
export type Expression = ArrayLiteral | AsExpression | AssertionExpression | AssumptionExpression | BinaryExpression | MethodBlockLiteral | CallExpression | IdentifierExpression | AutotypeCallExpression | IndexedAccessExpression | InvalidExpression | IsExpression | NotExpression | MethodLiteral | ParenthesizedExpression | WhenTernaryExpression | PrefixUnaryExpression | PropertyAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | GenericSpecializationExpression | DefaultMatchExpression | TokenExpression | KeywordExpression | ObjectExpression | BaseExpression;
|
909
932
|
export declare class ArrayLiteral extends BaseNode {
|
910
933
|
readonly kind = NodeKind.ArrayLiteral;
|
911
934
|
readonly children: readonly [
|
@@ -981,7 +1004,7 @@ export declare class BinaryExpression extends BaseNode {
|
|
981
1004
|
constructor(left: Expression, operator: BinaryExpressionOperator, right: Expression);
|
982
1005
|
toRed(rangeStart: number, parent: red.ExpressionParent): red.BinaryExpression;
|
983
1006
|
}
|
984
|
-
export type BinaryExpressionOperator = Token<TokenKind.Plus> | Token<TokenKind.Minus> | Token<TokenKind.Asterisk> | Token<TokenKind.Slash> | Token<TokenKind.Backslash> | Token<TokenKind.BackslashBackslash> | Token<TokenKind.EqualsEquals> | Token<TokenKind.ExclamationEquals> | Token<TokenKind.LessThan> | Token<TokenKind.GreaterThan> | Token<TokenKind.LessThanEquals> | Token<TokenKind.GreaterThanEquals> | Token<TokenKind.QuestionQuestion> | Keyword<KeywordKind.Or> | Keyword<KeywordKind.And> | Keyword<KeywordKind.Xor>;
|
1007
|
+
export type BinaryExpressionOperator = Token<TokenKind.Plus> | Token<TokenKind.Minus> | Token<TokenKind.Asterisk> | Token<TokenKind.Slash> | Token<TokenKind.Backslash> | Token<TokenKind.BackslashBackslash> | Token<TokenKind.EqualsEquals> | Token<TokenKind.ExclamationEquals> | Token<TokenKind.LessThan> | Token<TokenKind.GreaterThan> | Token<TokenKind.LessThanEquals> | Token<TokenKind.GreaterThanEquals> | Token<TokenKind.QuestionQuestion> | Keyword<KeywordKind.Or> | Keyword<KeywordKind.And> | Keyword<KeywordKind.Xor> | Token<TokenKind.Ampersand> | Token<TokenKind.Bar> | Token<TokenKind.BarBar>;
|
985
1008
|
export declare class MethodBlockLiteral extends BaseNode {
|
986
1009
|
readonly kind = NodeKind.MethodBlockLiteral;
|
987
1010
|
readonly children: readonly [
|
@@ -1079,22 +1102,6 @@ export declare class IsExpression extends BaseNode {
|
|
1079
1102
|
constructor(expression: Expression, isKeyword: Keyword<KeywordKind.Is>, typeSpecifier: TypeSpecifier);
|
1080
1103
|
toRed(rangeStart: number, parent: red.ExpressionParent): red.IsExpression;
|
1081
1104
|
}
|
1082
|
-
export declare class UnobservableExpression extends BaseNode {
|
1083
|
-
readonly kind = NodeKind.UnobservableExpression;
|
1084
|
-
readonly children: readonly [
|
1085
|
-
Keyword<KeywordKind.Unobservable>,
|
1086
|
-
Token<TokenKind.OpenParenthesis>,
|
1087
|
-
Expression,
|
1088
|
-
Token<TokenKind.CloseParenthesis>
|
1089
|
-
];
|
1090
|
-
get unobservableKeyword(): Keyword<KeywordKind.Unobservable>;
|
1091
|
-
get openParenthesisToken(): Token<TokenKind.OpenParenthesis>;
|
1092
|
-
get expression(): Expression;
|
1093
|
-
get closeParenthesisToken(): Token<TokenKind.CloseParenthesis>;
|
1094
|
-
protected get thisAsNode(): Node;
|
1095
|
-
constructor(unobservableKeyword: Keyword<KeywordKind.Unobservable>, openParenthesisToken: Token<TokenKind.OpenParenthesis>, expression: Expression, closeParenthesisToken: Token<TokenKind.CloseParenthesis>);
|
1096
|
-
toRed(rangeStart: number, parent: red.ExpressionParent): red.UnobservableExpression;
|
1097
|
-
}
|
1098
1105
|
export declare class NotExpression extends BaseNode {
|
1099
1106
|
readonly kind = NodeKind.NotExpression;
|
1100
1107
|
readonly children: readonly [
|
@@ -1115,18 +1122,18 @@ export declare class MethodLiteral extends BaseNode {
|
|
1115
1122
|
readonly kind = NodeKind.MethodLiteral;
|
1116
1123
|
readonly children: readonly [
|
1117
1124
|
Keyword<KeywordKind.Async> | undefined,
|
1118
|
-
Keyword<KeywordKind.
|
1125
|
+
Keyword<KeywordKind.Function>,
|
1119
1126
|
ParameterClause,
|
1120
1127
|
TypeAnnotation | undefined,
|
1121
1128
|
StatementBlock
|
1122
1129
|
];
|
1123
1130
|
get asyncKeyword(): Keyword<KeywordKind.Async> | undefined;
|
1124
|
-
get
|
1131
|
+
get functionKeyword(): Keyword<KeywordKind.Function>;
|
1125
1132
|
get parameterClause(): ParameterClause;
|
1126
1133
|
get returnTypeAnnotation(): TypeAnnotation | undefined;
|
1127
1134
|
get body(): StatementBlock;
|
1128
1135
|
protected get thisAsNode(): Node;
|
1129
|
-
constructor(asyncKeyword: Keyword<KeywordKind.Async> | undefined,
|
1136
|
+
constructor(asyncKeyword: Keyword<KeywordKind.Async> | undefined, functionKeyword: Keyword<KeywordKind.Function>, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, body: StatementBlock);
|
1130
1137
|
toRed(rangeStart: number, parent: red.ExpressionParent): red.MethodLiteral;
|
1131
1138
|
}
|
1132
1139
|
export declare class ParenthesizedExpression extends BaseNode {
|
@@ -1303,22 +1310,6 @@ export declare class IdentifierExpression extends BaseNode {
|
|
1303
1310
|
constructor(identifier: Identifier);
|
1304
1311
|
toRed(rangeStart: number, parent: red.ExpressionParent): red.IdentifierExpression;
|
1305
1312
|
}
|
1306
|
-
export declare class TransactionalExpression extends BaseNode {
|
1307
|
-
readonly kind = NodeKind.TransactionalExpression;
|
1308
|
-
readonly children: readonly [
|
1309
|
-
Keyword<KeywordKind.Transactional>,
|
1310
|
-
Token<TokenKind.OpenParenthesis>,
|
1311
|
-
Expression,
|
1312
|
-
Token<TokenKind.CloseParenthesis>
|
1313
|
-
];
|
1314
|
-
get transactionalKeyword(): Keyword<KeywordKind.Transactional>;
|
1315
|
-
get openParenthesisToken(): Token<TokenKind.OpenParenthesis>;
|
1316
|
-
get expression(): Expression;
|
1317
|
-
get closeParenthesisToken(): Token<TokenKind.CloseParenthesis>;
|
1318
|
-
protected get thisAsNode(): Node;
|
1319
|
-
constructor(transactionalKeyword: Keyword<KeywordKind.Transactional>, openParenthesisToken: Token<TokenKind.OpenParenthesis>, expression: Expression, closeParenthesisToken: Token<TokenKind.CloseParenthesis>);
|
1320
|
-
toRed(rangeStart: number, parent: red.ExpressionParent): red.TransactionalExpression;
|
1321
|
-
}
|
1322
1313
|
export declare class GenericSpecializationExpression extends BaseNode {
|
1323
1314
|
readonly kind = NodeKind.GenericSpecializationExpression;
|
1324
1315
|
readonly children: readonly [
|
@@ -1341,7 +1332,7 @@ export declare class DefaultMatchExpression extends BaseNode {
|
|
1341
1332
|
constructor(asteriskToken: Token<TokenKind.Asterisk>);
|
1342
1333
|
toRed(rangeStart: number, parent: red.ExpressionParent): red.DefaultMatchExpression;
|
1343
1334
|
}
|
1344
|
-
export type Statement = RunStatement | EmptyStatement | IfStatement | ForStatement | WhileStatement | LoopStatement | ReturnStatement | ErrorStatement | LocalVariableDeclarationStatement | AssignmentStatement | YieldStatement | InvalidStatement | ExpressionStatement | SwitchStatement | BreakLoopStatement | ContinueLoopStatement | NestedMethodDeclarationStatement |
|
1335
|
+
export type Statement = RunStatement | EmptyStatement | IfStatement | ForStatement | WhileStatement | LoopStatement | ReturnStatement | ErrorStatement | LocalVariableDeclarationStatement | AssignmentStatement | YieldStatement | InvalidStatement | ExpressionStatement | SwitchStatement | BreakLoopStatement | ContinueLoopStatement | NestedMethodDeclarationStatement | DisposeStatement;
|
1345
1336
|
export declare class AssignmentStatement extends BaseNode {
|
1346
1337
|
readonly kind = NodeKind.AssignmentStatement;
|
1347
1338
|
readonly children: readonly [
|
@@ -1601,18 +1592,6 @@ export declare class LocalVariableDeclarationStatement extends BaseNode {
|
|
1601
1592
|
constructor(declaration: LocalVariableDeclaration);
|
1602
1593
|
toRed(rangeStart: number, parent: red.StatementParent): red.LocalVariableDeclarationStatement;
|
1603
1594
|
}
|
1604
|
-
export declare class UnobservableStatement extends BaseNode {
|
1605
|
-
readonly kind = NodeKind.UnobservableStatement;
|
1606
|
-
readonly children: readonly [
|
1607
|
-
Keyword<KeywordKind.Unobservable>,
|
1608
|
-
StatementBlock
|
1609
|
-
];
|
1610
|
-
get unobservableKeyword(): Keyword<KeywordKind.Unobservable>;
|
1611
|
-
get body(): StatementBlock;
|
1612
|
-
protected get thisAsNode(): Node;
|
1613
|
-
constructor(unobservableKeyword: Keyword<KeywordKind.Unobservable>, body: StatementBlock);
|
1614
|
-
toRed(rangeStart: number, parent: red.StatementParent): red.UnobservableStatement;
|
1615
|
-
}
|
1616
1595
|
export declare class LoopStatement extends BaseNode {
|
1617
1596
|
readonly kind = NodeKind.LoopStatement;
|
1618
1597
|
readonly children: readonly [
|
@@ -1686,18 +1665,6 @@ export declare class SwitchStatementCaseClause extends BaseNode {
|
|
1686
1665
|
constructor(caseKeyword: Keyword<KeywordKind.Case>, matchExpressionList: MatchExpressionList, body: StatementBlock);
|
1687
1666
|
toRed(rangeStart: number, parent: red.SwitchStatementCaseClauseParent): red.SwitchStatementCaseClause;
|
1688
1667
|
}
|
1689
|
-
export declare class TransactionalStatement extends BaseNode {
|
1690
|
-
readonly kind = NodeKind.TransactionalStatement;
|
1691
|
-
readonly children: readonly [
|
1692
|
-
Keyword<KeywordKind.Transactional>,
|
1693
|
-
StatementBlock
|
1694
|
-
];
|
1695
|
-
get transactionalKeyword(): Keyword<KeywordKind.Transactional>;
|
1696
|
-
get body(): StatementBlock;
|
1697
|
-
protected get thisAsNode(): Node;
|
1698
|
-
constructor(transactionalKeyword: Keyword<KeywordKind.Transactional>, body: StatementBlock);
|
1699
|
-
toRed(rangeStart: number, parent: red.StatementParent): red.TransactionalStatement;
|
1700
|
-
}
|
1701
1668
|
export declare class WhileStatement extends BaseNode {
|
1702
1669
|
readonly kind = NodeKind.WhileStatement;
|
1703
1670
|
readonly children: readonly [
|
@@ -1818,7 +1785,7 @@ export declare class TranslationTypeParameterClause extends BaseNode {
|
|
1818
1785
|
export declare class PackageMethodTranslation extends BaseNode {
|
1819
1786
|
readonly kind = NodeKind.PackageMethodTranslation;
|
1820
1787
|
readonly children: readonly [
|
1821
|
-
Keyword<KeywordKind.
|
1788
|
+
Keyword<KeywordKind.Function>,
|
1822
1789
|
Identifier,
|
1823
1790
|
TranslationTypeParameterClause | undefined,
|
1824
1791
|
TranslationParameterClause,
|
@@ -1827,7 +1794,7 @@ export declare class PackageMethodTranslation extends BaseNode {
|
|
1827
1794
|
TranslationTypeParameterClause | undefined,
|
1828
1795
|
TranslationParameterClause
|
1829
1796
|
];
|
1830
|
-
get
|
1797
|
+
get functionKeyword(): Keyword<KeywordKind.Function>;
|
1831
1798
|
get sourceName(): Identifier;
|
1832
1799
|
get sourceTypeParameterClause(): TranslationTypeParameterClause | undefined;
|
1833
1800
|
get sourceParameterClause(): TranslationParameterClause;
|
@@ -1836,13 +1803,13 @@ export declare class PackageMethodTranslation extends BaseNode {
|
|
1836
1803
|
get translatedTypeParameterClause(): TranslationTypeParameterClause | undefined;
|
1837
1804
|
get translatedParameterClause(): TranslationParameterClause;
|
1838
1805
|
protected get thisAsNode(): Node;
|
1839
|
-
constructor(
|
1806
|
+
constructor(functionKeyword: Keyword<KeywordKind.Function>, sourceName: Identifier, sourceTypeParameterClause: TranslationTypeParameterClause | undefined, sourceParameterClause: TranslationParameterClause, minusGreaterThanToken: Token<TokenKind.MinusGreaterThan>, translatedName: Identifier, translatedTypeParameterClause: TranslationTypeParameterClause | undefined, translatedParameterClause: TranslationParameterClause);
|
1840
1807
|
toRed(rangeStart: number, parent: red.PackageMethodTranslationParent): red.PackageMethodTranslation;
|
1841
1808
|
}
|
1842
1809
|
export declare class TypeMethodTranslation extends BaseNode {
|
1843
1810
|
readonly kind = NodeKind.TypeMethodTranslation;
|
1844
1811
|
readonly children: readonly [
|
1845
|
-
Keyword<KeywordKind.
|
1812
|
+
Keyword<KeywordKind.Function>,
|
1846
1813
|
Identifier,
|
1847
1814
|
TranslationTypeParameterClause | undefined,
|
1848
1815
|
TranslationParameterClause,
|
@@ -1851,7 +1818,7 @@ export declare class TypeMethodTranslation extends BaseNode {
|
|
1851
1818
|
TranslationTypeParameterClause | undefined,
|
1852
1819
|
TranslationParameterClause
|
1853
1820
|
];
|
1854
|
-
get
|
1821
|
+
get functionKeyword(): Keyword<KeywordKind.Function>;
|
1855
1822
|
get sourceName(): Identifier;
|
1856
1823
|
get sourceTypeParameterClause(): TranslationTypeParameterClause | undefined;
|
1857
1824
|
get sourceParameterClause(): TranslationParameterClause;
|
@@ -1860,7 +1827,7 @@ export declare class TypeMethodTranslation extends BaseNode {
|
|
1860
1827
|
get translatedTypeParameterClause(): TranslationTypeParameterClause | undefined;
|
1861
1828
|
get translatedParameterClause(): TranslationParameterClause;
|
1862
1829
|
protected get thisAsNode(): Node;
|
1863
|
-
constructor(
|
1830
|
+
constructor(functionKeyword: Keyword<KeywordKind.Function>, sourceName: Identifier, sourceTypeParameterClause: TranslationTypeParameterClause | undefined, sourceParameterClause: TranslationParameterClause, minusGreaterThanToken: Token<TokenKind.MinusGreaterThan>, translatedName: Identifier, translatedTypeParameterClause: TranslationTypeParameterClause | undefined, translatedParameterClause: TranslationParameterClause);
|
1864
1831
|
toRed(rangeStart: number, parent: red.TypeMethodTranslationParent): red.TypeMethodTranslation;
|
1865
1832
|
}
|
1866
1833
|
export declare class MethodTypeTranslation extends BaseNode {
|
@@ -2123,7 +2090,7 @@ export declare class Modifier extends BaseNode {
|
|
2123
2090
|
toRed(rangeStart: number, parent: red.ModifierParent): red.Modifier;
|
2124
2091
|
}
|
2125
2092
|
export type ModifierKeyword = Keyword<ModifierKeywordKind>;
|
2126
|
-
export type ModifierKeywordKind = KeywordKind.
|
2093
|
+
export type ModifierKeywordKind = KeywordKind.Hidden | KeywordKind.Basic | KeywordKind.Static | KeywordKind.Redefinable | KeywordKind.Abstract | KeywordKind.Redefined | KeywordKind.Async | KeywordKind.Const;
|
2127
2094
|
export type ModifierLevelKeyword = Keyword<KeywordKind.InType> | Keyword<KeywordKind.InHierarchy> | Keyword<KeywordKind.InFile> | Keyword<KeywordKind.InPackage>;
|
2128
2095
|
export declare class ParameterClause extends BaseNode {
|
2129
2096
|
readonly kind = NodeKind.ParameterClause;
|
@@ -2232,4 +2199,4 @@ export declare class TypeAnnotation extends BaseNode {
|
|
2232
2199
|
constructor(colonToken: Token<TokenKind.Colon>, typeSpecifier: TypeSpecifier);
|
2233
2200
|
toRed(rangeStart: number, parent: red.TypeAnnotationParent): red.TypeAnnotation;
|
2234
2201
|
}
|
2235
|
-
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 |
|
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;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { OperatorKind } from '../OperatorKind.js';
|
1
2
|
import * as red from '../red/index.js';
|
2
3
|
import { BaseNode } from './BaseNode.js';
|
3
4
|
import { Node, NodeKind, TokenKind, TriviaKind } from './index.js';
|
@@ -7,10 +8,10 @@ export declare const enum TokenFlags {
|
|
7
8
|
OriginalName = 2,// ~имя
|
8
9
|
QuotedName = 4,// 'имя', 'имя с пробелами', '+'
|
9
10
|
RequiresQuotes = 8,// 'имя с пробелами', '+'
|
10
|
-
EscapedKeyword = 16,//
|
11
|
-
|
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;
|
@@ -19,10 +20,11 @@ export declare class Token<TKind extends TokenKind = TokenKind> extends BaseNode
|
|
19
20
|
readonly value: string;
|
20
21
|
readonly leadingTrivia: readonly Trivia[];
|
21
22
|
readonly flags: TokenFlags;
|
23
|
+
readonly ifOperatorNameThenKind: OperatorKind | undefined;
|
22
24
|
get isMissing(): boolean;
|
23
25
|
protected get thisAsNode(): Node;
|
24
26
|
get rangeLength(): number;
|
25
|
-
constructor(tokenKind: TKind, value: string, leadingTrivia: readonly Trivia[], flags: TokenFlags);
|
27
|
+
constructor(tokenKind: TKind, value: string, leadingTrivia: readonly Trivia[], flags: TokenFlags, ifOperatorNameThenKind: OperatorKind | undefined);
|
26
28
|
getTextWithTrivia(): string;
|
27
29
|
toRed(rangeStart: number, parent: red.TokenParent): red.Token<TKind>;
|
28
30
|
hasPrecedingLineBreak(): boolean;
|