@artel/artc 0.6.25282 → 0.6.25284
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 +28 -20
- package/build/api/ApiNodeJS.js +3 -3
- package/build/api/ApiServices.js +1836 -1590
- package/build/{chunk-VVFLEWSA.js → chunk-CGOSDN2E.js} +18023 -15286
- package/build/{chunk-DURHSZYF.js → chunk-OBX375YX.js} +1 -1
- package/build/{chunk-3DN3M64Y.js → chunk-ZV3UW5X6.js} +2 -2
- package/build/types/analysis/AccessibilityCheck.d.ts +20 -0
- package/build/types/analysis/Analyzer.d.ts +53 -78
- package/build/types/analysis/BaseMemberConflictsValidator.d.ts +2 -4
- package/build/types/analysis/ConstructorCallResolver.d.ts +3 -4
- package/build/types/analysis/MemberAccessExpressionMeaning.d.ts +2 -1
- package/build/types/analysis/ModifierValidator.d.ts +17 -15
- package/build/types/analysis/NodeTypeUtils.d.ts +3 -3
- package/build/types/analysis/PackageMemberLookup.d.ts +11 -4
- package/build/types/analysis/ReachabilityChecker.d.ts +27 -0
- package/build/types/analysis/ReductionSourceMemberFinder.d.ts +20 -0
- package/build/types/analysis/ReservedNameDictionary.d.ts +14 -0
- package/build/types/analysis/ResolvedImplementationPackage.d.ts +48 -0
- package/build/types/analysis/SourceFileAnalyzer.d.ts +3 -0
- package/build/types/analysis/TypeArgumentInferrer.d.ts +1 -0
- package/build/types/analysis/TypeMemberLookup.d.ts +36 -22
- package/build/types/analysis/Utils.d.ts +2 -0
- package/build/types/analysis/WellKnownDeclarations.d.ts +11 -7
- package/build/types/analysis/control-flow/GraphBuilder.d.ts +4 -1
- package/build/types/analysis/semantic-context/FieldWithInitializerSemanticContext.d.ts +6 -5
- package/build/types/analysis/semantic-context/SemanticContextBase.d.ts +8 -7
- package/build/types/analysis/semantic-context/SemanticContextValidatingNameConflicts.d.ts +4 -5
- package/build/types/analysis/semantic-context/SemanticContextWithParent.d.ts +2 -0
- package/build/types/analysis/semantic-context/SourceFileSemanticContext.d.ts +11 -6
- package/build/types/analysis/semantic-context/SubprogramBodyAndParametersSemanticContext.d.ts +5 -5
- package/build/types/analysis/semantic-context/SubprogramSemanticContext.d.ts +4 -5
- package/build/types/analysis/semantic-context/TypeSemanticContext.d.ts +18 -15
- package/build/types/api/Api.d.ts +1 -1
- package/build/types/common/HelperPhrases.d.ts +2 -1
- package/build/types/common/LocalizationHelper.d.ts +8 -6
- package/build/types/common/index.d.ts +0 -1
- package/build/types/diagnostic/DiagnosticCode.d.ts +154 -131
- package/build/types/emitter/Entities.d.ts +5 -4
- package/build/types/emitter/EntityMap.d.ts +5 -1
- package/build/types/emitter/IrBuilder.d.ts +1 -0
- package/build/types/emitter/ir/Nodes.d.ts +11 -2
- package/build/types/entities/Entity.d.ts +9 -18
- package/build/types/entities/EntityHiding.d.ts +1 -4
- package/build/types/entities/EntityLocalizationContext.d.ts +3 -3
- package/build/types/entities/IEntity.d.ts +2 -1
- package/build/types/entities/OperatorKind.d.ts +6 -3
- package/build/types/entities/TypeEntity.d.ts +7 -6
- package/build/types/entities/index.d.ts +0 -2
- package/build/types/entities/interfaces/AliasTypeEntity.d.ts +1 -6
- package/build/types/entities/interfaces/ConstructorEntity.d.ts +3 -5
- package/build/types/entities/interfaces/DereferenceOperatorEntity.d.ts +2 -5
- package/build/types/entities/interfaces/DestructorEntity.d.ts +4 -5
- package/build/types/entities/interfaces/FunctionEntity.d.ts +3 -8
- package/build/types/entities/interfaces/FunctionTypeEntity.d.ts +0 -8
- package/build/types/entities/interfaces/GetterEntity.d.ts +0 -4
- package/build/types/entities/interfaces/IndexerEntity.d.ts +2 -5
- package/build/types/entities/interfaces/OperatorEntity.d.ts +3 -5
- package/build/types/entities/interfaces/PackageAliasEntity.d.ts +0 -5
- package/build/types/entities/interfaces/PackageEntity.d.ts +1 -9
- package/build/types/entities/interfaces/ReducedTypeEntity.d.ts +99 -0
- package/build/types/entities/interfaces/SetterEntity.d.ts +0 -4
- package/build/types/entities/interfaces/StructuredTypeEntity.d.ts +0 -8
- package/build/types/entities/interfaces/TextTranslationEntity.d.ts +1 -0
- package/build/types/entities/interfaces/TypeExtensionEntity.d.ts +1 -7
- package/build/types/entities/interfaces/TypeParameterEntity.d.ts +2 -4
- package/build/types/entities/interfaces/VariableEntity.d.ts +2 -11
- package/build/types/entities/interfaces/VariantTypeEntity.d.ts +1 -8
- package/build/types/entities/interfaces/index.d.ts +1 -0
- package/build/types/entities/intrinsic/IntrinsicConstructorEntity.d.ts +3 -1
- package/build/types/entities/intrinsic/IntrinsicFunctionEntity.d.ts +2 -1
- package/build/types/entities/intrinsic/IntrinsicFunctionTypeEntity.d.ts +3 -3
- package/build/types/entities/intrinsic/IntrinsicStructuredTypeEntity.d.ts +3 -3
- package/build/types/entities/intrinsic/IntrinsicTypeParameterEntity.d.ts +2 -4
- package/build/types/entities/intrinsic/IntrinsicVariableEntity.d.ts +2 -1
- package/build/types/entities/source/SourceAliasTypeEntity.d.ts +1 -2
- package/build/types/entities/source/SourceConstructorEntity.d.ts +6 -2
- package/build/types/entities/source/SourceDereferenceOperatorEntity.d.ts +3 -1
- package/build/types/entities/source/SourceDestructorEntity.d.ts +6 -1
- package/build/types/entities/source/SourceFunctionEntity.d.ts +5 -1
- package/build/types/entities/source/SourceFunctionTypeEntity.d.ts +1 -3
- package/build/types/entities/source/SourceIndexerEntity.d.ts +3 -1
- package/build/types/entities/source/SourceOperatorEntity.d.ts +5 -1
- package/build/types/entities/source/SourceReducedTypeEntity.d.ts +44 -0
- package/build/types/entities/source/SourceStructuredTypeEntity.d.ts +1 -3
- package/build/types/entities/source/SourceTextTranslationEntity.d.ts +1 -0
- package/build/types/entities/source/SourceTypeExtensionEntity.d.ts +1 -2
- package/build/types/entities/source/SourceTypeParameterEntity.d.ts +1 -2
- package/build/types/entities/source/SourceVariableEntity.d.ts +7 -1
- package/build/types/entities/source/SourceVariantTypeEntity.d.ts +1 -3
- package/build/types/entities/source/index.d.ts +1 -0
- package/build/types/entities/translated/TranslatedAliasTypeEntity.d.ts +1 -3
- package/build/types/entities/translated/TranslatedConstructorEntity.d.ts +9 -4
- package/build/types/entities/translated/TranslatedDereferenceOperatorEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedDestructorEntity.d.ts +4 -1
- package/build/types/entities/translated/TranslatedFunctionEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedFunctionTypeEntity.d.ts +1 -5
- package/build/types/entities/translated/TranslatedIndexerEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedOperatorEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedReducedTypeEntity.d.ts +59 -0
- package/build/types/entities/translated/TranslatedStructuredTypeEntity.d.ts +1 -5
- package/build/types/entities/translated/TranslatedTypeExtensionEntity.d.ts +1 -3
- package/build/types/entities/translated/TranslatedTypeParameterEntity.d.ts +1 -3
- package/build/types/entities/translated/TranslatedVariableEntity.d.ts +3 -1
- package/build/types/entities/translated/TranslatedVariantTypeEntity.d.ts +1 -5
- package/build/types/entities/translated/index.d.ts +1 -0
- package/build/types/parser/KeywordDictionary.d.ts +10 -2
- package/build/types/parser/TokenKind.d.ts +46 -44
- package/build/types/project/SourceFile.d.ts +3 -1
- package/build/types/services/CompletionService.d.ts +5 -4
- package/build/types/services/CustomRequests.d.ts +17 -6
- package/build/types/services/DisplayService.d.ts +78 -3
- package/build/types/services/LanguageServer.d.ts +3 -4
- package/build/types/services/ScriptEditingService.d.ts +25 -0
- package/build/types/services/TranslationService.d.ts +1 -1
- package/build/types/services/Types.d.ts +6 -0
- package/build/types/services/source-generation/EntityToSyntax.d.ts +16 -0
- package/build/types/tree/BaseNode.d.ts +56 -2
- package/build/types/tree/KeywordFlags.d.ts +28 -0
- package/build/types/tree/KeywordKind.d.ts +57 -54
- package/build/types/tree/NodeKind.d.ts +142 -140
- package/build/types/tree/Nodes.d.ts +55 -29
- package/build/types/tree/NodesDebug.d.ts +9 -0
- package/build/types/tree/OperatorKind.d.ts +6 -3
- package/build/types/tree/SyntaxFactory.d.ts +33 -29
- package/build/types/tree/SyntaxToCode.d.ts +4 -0
- package/build/types/tree/TokenFlags.d.ts +15 -0
- package/build/types/tree/TokenKind.d.ts +58 -44
- package/build/types/tree/Utils.d.ts +2 -2
- package/build/types/tree/index.d.ts +2 -1
- package/build/types/ts-interop/Entities.d.ts +11 -12
- package/build/types/ts-interop/TsInteropContext.d.ts +1 -2
- package/build/types/ts-interop/TsPackageMembersCreator.d.ts +1 -1
- package/build/types/types/AliasType.d.ts +0 -1
- package/build/types/types/FunctionType.d.ts +0 -1
- package/build/types/types/IntersectionType.d.ts +0 -1
- package/build/types/types/ParameterType.d.ts +0 -1
- package/build/types/types/ReducedType.d.ts +24 -0
- package/build/types/types/StructuredType.d.ts +1 -2
- package/build/types/types/SubstitutionStubType.d.ts +21 -0
- package/build/types/types/Type.d.ts +5 -3
- package/build/types/types/TypeFactory.d.ts +4 -2
- package/build/types/types/UnionType.d.ts +0 -1
- package/build/types/types/UnresolvedType.d.ts +0 -1
- package/build/types/types/VariantType.d.ts +0 -1
- package/build/types/types/index.d.ts +3 -1
- package/package.json +1 -1
- package/build/types/analysis/semantic-context/SemanticContextBasedEntityHidingMatcher.d.ts +0 -14
- package/build/types/entities/BaseEntityHidingMatcher.d.ts +0 -11
- package/build/types/entities/EntityHidingMatcherWithinTypeEntity.d.ts +0 -10
- package/build/types/parser/ReservedIdentifierDictionary.d.ts +0 -11
- package/build/types/services/AddBlockToScriptService.d.ts +0 -17
- package/build/types/services/AssignFieldService.d.ts +0 -10
- package/build/types/services/DeleteBlockFromScriptService.d.ts +0 -6
- package/build/types/tree/Token.d.ts +0 -58
- /package/build/types/services/{ProjectItemsService.d.ts → WorkspaceItemsService.d.ts} +0 -0
|
@@ -21,144 +21,146 @@ export declare enum NodeKind {
|
|
|
21
21
|
AnonymousVariantTypeDeclaration = 19,
|
|
22
22
|
PackageAliasTypeDeclaration = 20,
|
|
23
23
|
AliasTypeDeclarationBody = 21,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
24
|
+
PackageReducedTypeDeclaration = 22,
|
|
25
|
+
ReducedTypeDeclarationBody = 23,
|
|
26
|
+
PackageMemberGroupDeclaration = 24,
|
|
27
|
+
PackageConstructorDeclaration = 25,
|
|
28
|
+
PackageEntryPointDeclaration = 26,
|
|
29
|
+
PackageFunctionDeclaration = 27,
|
|
30
|
+
PackageFunctionTypeDeclaration = 28,
|
|
31
|
+
FunctionTypeDeclarationBody = 29,
|
|
32
|
+
BaseTypeList = 30,
|
|
33
|
+
TypeMemberDeclarationList = 31,
|
|
34
|
+
TypeMemberDeclarationBlock = 32,
|
|
35
|
+
PackageStructuredTypeDeclaration = 33,
|
|
36
|
+
StructuredTypeDeclarationBody = 34,
|
|
37
|
+
PackageVariableDeclaration = 35,
|
|
38
|
+
PackageVariableGetterDeclaration = 36,
|
|
39
|
+
PackageVariableSetterDeclaration = 37,
|
|
40
|
+
PackageVariantTypeDeclaration = 38,
|
|
41
|
+
VariantTypeDeclarationBody = 39,
|
|
42
|
+
TypeExtensionDeclaration = 40,
|
|
43
|
+
ExtendedTypeClauseCommaList = 41,
|
|
44
|
+
ExtendedTypeClause = 42,
|
|
45
|
+
MissingPackageMemberDeclaration = 43,
|
|
46
|
+
TypeMemberGroupDeclaration = 44,
|
|
47
|
+
ConstructorDeclaration = 45,
|
|
48
|
+
DestructorDeclaration = 46,
|
|
49
|
+
IndexedElementGetterDeclaration = 47,
|
|
50
|
+
IndexedElementSetterDeclaration = 48,
|
|
51
|
+
IndexParameterClause = 49,
|
|
52
|
+
DereferencedVariableGetterDeclaration = 50,
|
|
53
|
+
DereferencedVariableSetterDeclaration = 51,
|
|
54
|
+
MethodDeclaration = 52,
|
|
55
|
+
OperatorDeclaration = 53,
|
|
56
|
+
FieldDeclaration = 54,
|
|
57
|
+
FieldGetterDeclaration = 55,
|
|
58
|
+
FieldSetterDeclaration = 56,
|
|
59
|
+
MissingTypeMemberDeclaration = 57,
|
|
60
|
+
NestedFunctionDeclaration = 58,
|
|
61
|
+
LocalVariableDeclaration = 59,
|
|
62
|
+
ForStatementVariableDeclaration = 60,
|
|
63
|
+
ArrayLiteral = 61,
|
|
64
|
+
ArrayLiteralElementList = 62,
|
|
65
|
+
AssertionExpression = 63,
|
|
66
|
+
AssumptionExpression = 64,
|
|
67
|
+
AsExpression = 65,
|
|
68
|
+
BinaryExpression = 66,
|
|
69
|
+
FunctionLiteral = 67,
|
|
70
|
+
FunctionBlockLiteral = 68,
|
|
71
|
+
ArgumentList = 69,
|
|
72
|
+
CallExpression = 70,
|
|
73
|
+
AutotypeCallExpression = 71,
|
|
74
|
+
IndexedAccessExpression = 72,
|
|
75
|
+
MissingExpression = 73,
|
|
76
|
+
IsExpression = 74,
|
|
77
|
+
ParenthesizedExpression = 75,
|
|
78
|
+
ConditionalExpression = 76,
|
|
79
|
+
PrefixUnaryExpression = 77,
|
|
80
|
+
MemberAccessExpression = 78,
|
|
81
|
+
ReferenceExpression = 79,
|
|
82
|
+
DereferenceExpression = 80,
|
|
83
|
+
TextTemplateLiteral = 81,
|
|
84
|
+
LocalizableTextTemplateLiteral = 82,
|
|
85
|
+
TextTemplateSpanList = 83,
|
|
86
|
+
TextTemplateSpan = 84,
|
|
87
|
+
TokenExpression = 85,
|
|
88
|
+
TextLiteral = 86,
|
|
89
|
+
LocalizableTextLiteral = 87,
|
|
90
|
+
KeywordExpression = 88,
|
|
91
|
+
ObjectExpression = 89,
|
|
92
|
+
BaseExpression = 90,
|
|
93
|
+
IdentifierExpression = 91,
|
|
94
|
+
GenericSpecializationExpression = 92,
|
|
95
|
+
DefaultMatchExpression = 93,
|
|
96
|
+
AssignmentStatement = 94,
|
|
97
|
+
StatementList = 95,
|
|
98
|
+
StatementBlock = 96,
|
|
99
|
+
FunctionBlock = 97,
|
|
100
|
+
BreakLoopStatement = 98,
|
|
101
|
+
ContinueLoopStatement = 99,
|
|
102
|
+
DisposeStatement = 100,
|
|
103
|
+
RunStatement = 101,
|
|
104
|
+
TryStatement = 102,
|
|
105
|
+
CatchClause = 103,
|
|
106
|
+
ErrorVariableDeclaration = 104,
|
|
107
|
+
FinallyClause = 105,
|
|
108
|
+
ErrorStatement = 106,
|
|
109
|
+
ImportantStatement = 107,
|
|
110
|
+
ExpressionStatement = 108,
|
|
111
|
+
ForStatement = 109,
|
|
112
|
+
IfStatement = 110,
|
|
113
|
+
ElseIfClauseList = 111,
|
|
114
|
+
ElseIfClause = 112,
|
|
115
|
+
ElseClause = 113,
|
|
116
|
+
MissingStatement = 114,
|
|
117
|
+
NestedFunctionDeclarationStatement = 115,
|
|
118
|
+
LocalVariableDeclarationStatement = 116,
|
|
119
|
+
LoopStatement = 117,
|
|
120
|
+
ReturnStatement = 118,
|
|
121
|
+
CaseClauseList = 119,
|
|
122
|
+
SwitchStatement = 120,
|
|
123
|
+
MatchExpressionList = 121,
|
|
124
|
+
CaseClause = 122,
|
|
125
|
+
WhileStatement = 123,
|
|
126
|
+
YieldStatement = 124,
|
|
127
|
+
TranslationsDeclaration = 125,
|
|
128
|
+
TopLevelTranslationList = 126,
|
|
129
|
+
TranslationParameterList = 127,
|
|
130
|
+
TranslationParameterClause = 128,
|
|
131
|
+
ConstructorTranslation = 129,
|
|
132
|
+
IndexParameterTranslationClause = 130,
|
|
133
|
+
IndexerTranslation = 131,
|
|
134
|
+
TranslationTypeParameterList = 132,
|
|
135
|
+
TranslationTypeParameterClause = 133,
|
|
136
|
+
PackageFunctionTranslationDeclaration = 134,
|
|
137
|
+
MethodTranslation = 135,
|
|
138
|
+
FunctionTypeTranslationDeclaration = 136,
|
|
139
|
+
QualifiedName = 137,
|
|
140
|
+
PackageVariableTranslationDeclaration = 138,
|
|
141
|
+
FieldOrVariantTranslation = 139,
|
|
142
|
+
TypeMemberTranslationList = 140,
|
|
143
|
+
TypeTranslationDeclaration = 141,
|
|
144
|
+
TextTranslationDeclaration = 142,
|
|
145
|
+
TextTranslationFunctionDeclaration = 143,
|
|
146
|
+
TranslationTextLiteral = 144,
|
|
147
|
+
TranslationTextTemplate = 145,
|
|
148
|
+
TranslationTextTemplateSpanList = 146,
|
|
149
|
+
TranslationTextTemplateSpan = 147,
|
|
150
|
+
TranslationTextTemplateParameter = 148,
|
|
151
|
+
VariantValueDeclaration = 149,
|
|
152
|
+
TypeParameterDeclaration = 150,
|
|
153
|
+
ParameterDeclaration = 151,
|
|
154
|
+
Argument = 152,
|
|
155
|
+
TagList = 153,
|
|
156
|
+
Tag = 154,
|
|
157
|
+
ModifierList = 155,
|
|
158
|
+
Modifier = 156,
|
|
159
|
+
ParameterClause = 157,
|
|
160
|
+
ParameterList = 158,
|
|
161
|
+
TypeArgumentClause = 159,
|
|
162
|
+
TypeArgumentList = 160,
|
|
163
|
+
TypeParameterClause = 161,
|
|
164
|
+
TypeParameterList = 162,
|
|
165
|
+
TypeAnnotation = 163
|
|
164
166
|
}
|
|
@@ -1,26 +1,16 @@
|
|
|
1
1
|
import { PackageDialect, PackageLocale, Query, Range } from '../common/index.js';
|
|
2
2
|
import { ParserDiagnostic } from '../parser/ParserDiagnostic.js';
|
|
3
|
-
import { BaseNode } from './BaseNode.js';
|
|
3
|
+
import { BaseNode, Keyword, Token } from './BaseNode.js';
|
|
4
4
|
import { KeywordKind } from './KeywordKind.js';
|
|
5
5
|
import { NodeKind } from './NodeKind.js';
|
|
6
6
|
import { OperatorKind } from './OperatorKind.js';
|
|
7
|
-
import { Token } from './Token.js';
|
|
8
7
|
import { TokenKind } from './TokenKind.js';
|
|
8
|
+
import { NodesWithChild } from './NodesDebug.js';
|
|
9
9
|
export type Comma = Token<TokenKind.Comma>;
|
|
10
10
|
export type Semicolon = Token<TokenKind.Semicolon>;
|
|
11
11
|
export type Identifier = Token<TokenKind.Identifier>;
|
|
12
12
|
export type IdentifierParent = NodesWithChild<Identifier>;
|
|
13
13
|
export type IdentifierListElement = Identifier | Comma;
|
|
14
|
-
export declare class Keyword<TKind extends KeywordKind = KeywordKind> extends BaseNode {
|
|
15
|
-
readonly kind = NodeKind.Keyword;
|
|
16
|
-
readonly children: readonly Identifier[];
|
|
17
|
-
readonly keywordKind: TKind;
|
|
18
|
-
readonly isMissing: boolean;
|
|
19
|
-
get parent(): Node;
|
|
20
|
-
get tokens(): readonly Identifier[];
|
|
21
|
-
protected get thisAsNode(): Node;
|
|
22
|
-
constructor(tokens: readonly Identifier[], keywordKind: TKind, isMissing: boolean | undefined, rangeWithTrivia: Range | undefined);
|
|
23
|
-
}
|
|
24
14
|
export declare class SourceFile extends BaseNode {
|
|
25
15
|
readonly kind = NodeKind.SourceFile;
|
|
26
16
|
readonly children: readonly [
|
|
@@ -127,7 +117,7 @@ export declare class PackageName extends BaseNode {
|
|
|
127
117
|
constructor(parts: readonly PackageNamePart[], rangeWithTrivia: Range | undefined);
|
|
128
118
|
}
|
|
129
119
|
export type TypeSpecifier = NamedTypeSpecifier | AnonymousTypeSpecifier | UnionTypeSpecifier | IntersectionTypeSpecifier | ParenthesizedTypeSpecifier | NullableTypeSpecifier | MissingTypeSpecifier;
|
|
130
|
-
export type NamedTypeSpecifierParent = BaseTypeList | NonNamedTypeSpecifierParent;
|
|
120
|
+
export type NamedTypeSpecifierParent = BaseTypeList | ReducedTypeDeclarationBody | NonNamedTypeSpecifierParent;
|
|
131
121
|
export type NonNamedTypeSpecifierParent = AliasTypeDeclarationBody | AsExpression | IsExpression | TypeParameterDeclaration | TypeArgumentList | TypeAnnotation | ParenthesizedTypeSpecifier | NullableTypeSpecifier | UnionTypeSpecifier | IntersectionTypeSpecifier;
|
|
132
122
|
export declare class NamedTypeSpecifier extends BaseNode {
|
|
133
123
|
readonly kind = NodeKind.NamedTypeSpecifier;
|
|
@@ -235,7 +225,7 @@ export declare class AnonymousVariantTypeDeclaration extends BaseNode {
|
|
|
235
225
|
protected get thisAsNode(): Node;
|
|
236
226
|
constructor(body: VariantTypeDeclarationBody, rangeWithTrivia: Range | undefined);
|
|
237
227
|
}
|
|
238
|
-
export type PackageMemberDeclaration = PackageAliasTypeDeclaration | PackageMemberGroupDeclaration | TypeExtensionDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageFunctionDeclaration | PackageFunctionTypeDeclaration | PackageStructuredTypeDeclaration | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | MissingPackageMemberDeclaration | TranslationsDeclaration;
|
|
228
|
+
export type PackageMemberDeclaration = PackageAliasTypeDeclaration | PackageReducedTypeDeclaration | PackageMemberGroupDeclaration | TypeExtensionDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageFunctionDeclaration | PackageFunctionTypeDeclaration | PackageStructuredTypeDeclaration | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | MissingPackageMemberDeclaration | TranslationsDeclaration;
|
|
239
229
|
export declare class PackageAliasTypeDeclaration extends BaseNode {
|
|
240
230
|
readonly kind = NodeKind.PackageAliasTypeDeclaration;
|
|
241
231
|
readonly children: readonly [
|
|
@@ -270,6 +260,46 @@ export declare class AliasTypeDeclarationBody extends BaseNode {
|
|
|
270
260
|
protected get thisAsNode(): Node;
|
|
271
261
|
constructor(aliasedTypeSpecifier: TypeSpecifier, memberBlock: TypeMemberDeclarationBlock | undefined, rangeWithTrivia: Range | undefined);
|
|
272
262
|
}
|
|
263
|
+
export declare class PackageReducedTypeDeclaration extends BaseNode {
|
|
264
|
+
readonly kind = NodeKind.PackageReducedTypeDeclaration;
|
|
265
|
+
readonly children: readonly [
|
|
266
|
+
TagList,
|
|
267
|
+
ModifierList,
|
|
268
|
+
Keyword<KeywordKind.Type>,
|
|
269
|
+
Identifier,
|
|
270
|
+
TypeParameterClause | undefined,
|
|
271
|
+
Token<TokenKind.Equals>,
|
|
272
|
+
ReducedTypeDeclarationBody
|
|
273
|
+
];
|
|
274
|
+
get parent(): PackageMemberDeclarationList;
|
|
275
|
+
get tagList(): TagList;
|
|
276
|
+
get modifierList(): ModifierList;
|
|
277
|
+
get typeKeyword(): Keyword<KeywordKind.Type>;
|
|
278
|
+
get name(): Identifier;
|
|
279
|
+
get typeParameterClause(): TypeParameterClause | undefined;
|
|
280
|
+
get equalsToken(): Token<TokenKind.Equals>;
|
|
281
|
+
get body(): ReducedTypeDeclarationBody;
|
|
282
|
+
protected get thisAsNode(): Node;
|
|
283
|
+
constructor(tagList: TagList, modifierList: ModifierList, typeKeyword: Keyword<KeywordKind.Type>, name: Identifier, typeParameterClause: TypeParameterClause | undefined, equalsToken: Token<TokenKind.Equals>, body: ReducedTypeDeclarationBody, rangeWithTrivia: Range | undefined);
|
|
284
|
+
}
|
|
285
|
+
export declare class ReducedTypeDeclarationBody extends BaseNode {
|
|
286
|
+
readonly kind = NodeKind.ReducedTypeDeclarationBody;
|
|
287
|
+
readonly children: readonly [
|
|
288
|
+
Keyword<KeywordKind.ReducedObject>,
|
|
289
|
+
NamedTypeSpecifier,
|
|
290
|
+
Comma | undefined,
|
|
291
|
+
BaseTypeList | undefined,
|
|
292
|
+
TypeMemberDeclarationBlock
|
|
293
|
+
];
|
|
294
|
+
get parent(): PackageReducedTypeDeclaration;
|
|
295
|
+
get reducedObjectKeyword(): Keyword<KeywordKind.ReducedObject>;
|
|
296
|
+
get reductionSourceSpecifier(): NamedTypeSpecifier;
|
|
297
|
+
get commaToken(): Comma | undefined;
|
|
298
|
+
get preservedTypeList(): BaseTypeList | undefined;
|
|
299
|
+
get memberBlock(): TypeMemberDeclarationBlock;
|
|
300
|
+
protected get thisAsNode(): Node;
|
|
301
|
+
constructor(reducedObjectKeyword: Keyword<KeywordKind.ReducedObject>, reductionSourceSpecifier: NamedTypeSpecifier, commaToken: Comma | undefined, preservedTypeList: BaseTypeList | undefined, memberBlock: TypeMemberDeclarationBlock, rangeWithTrivia: Range | undefined);
|
|
302
|
+
}
|
|
273
303
|
export declare class PackageMemberGroupDeclaration extends BaseNode {
|
|
274
304
|
readonly kind = NodeKind.PackageMemberGroupDeclaration;
|
|
275
305
|
readonly children: readonly [
|
|
@@ -384,7 +414,7 @@ export declare class FunctionTypeDeclarationBody extends BaseNode {
|
|
|
384
414
|
constructor(asyncKeyword: Keyword<KeywordKind.Async> | undefined, functionKeyword: Keyword<KeywordKind.Function>, parameterClause: ParameterClause, returnTypeAnnotation: TypeAnnotation | undefined, rangeWithTrivia: Range | undefined);
|
|
385
415
|
}
|
|
386
416
|
export type BaseTypeListElement = NamedTypeSpecifier | Comma;
|
|
387
|
-
export type BaseTypeListParent = VariantTypeDeclarationBody | StructuredTypeDeclarationBody;
|
|
417
|
+
export type BaseTypeListParent = VariantTypeDeclarationBody | StructuredTypeDeclarationBody | ReducedTypeDeclarationBody;
|
|
388
418
|
export declare class BaseTypeList extends BaseNode {
|
|
389
419
|
readonly kind = NodeKind.BaseTypeList;
|
|
390
420
|
readonly children: readonly BaseTypeListElement[];
|
|
@@ -404,7 +434,7 @@ export declare class TypeMemberDeclarationList extends BaseNode {
|
|
|
404
434
|
protected get thisAsNode(): Node;
|
|
405
435
|
constructor(elements: readonly TypeMemberDeclarationListElement[], rangeWithTrivia: Range | undefined);
|
|
406
436
|
}
|
|
407
|
-
export type TypeMemberDeclarationBlockParent = StructuredTypeDeclarationBody | VariantTypeDeclarationBody | AliasTypeDeclarationBody | TypeExtensionDeclaration | TypeMemberGroupDeclaration;
|
|
437
|
+
export type TypeMemberDeclarationBlockParent = StructuredTypeDeclarationBody | VariantTypeDeclarationBody | AliasTypeDeclarationBody | ReducedTypeDeclarationBody | TypeExtensionDeclaration | TypeMemberGroupDeclaration;
|
|
408
438
|
export declare class TypeMemberDeclarationBlock extends BaseNode {
|
|
409
439
|
readonly kind = NodeKind.TypeMemberDeclarationBlock;
|
|
410
440
|
readonly children: readonly [
|
|
@@ -995,7 +1025,7 @@ export declare class BinaryExpression extends BaseNode {
|
|
|
995
1025
|
protected get thisAsNode(): Node;
|
|
996
1026
|
constructor(left: Expression, operator: BinaryExpressionOperator, right: Expression, rangeWithTrivia: Range | undefined);
|
|
997
1027
|
}
|
|
998
|
-
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.LessThanOrEqual> | Token<TokenKind.GreaterThanOrEqual> | Token<TokenKind.QuestionQuestion> | Keyword<KeywordKind.Or> | Keyword<KeywordKind.And> | Keyword<KeywordKind.Xor> | Token<TokenKind.Ampersand> | Token<TokenKind.Bar> | Token<TokenKind.BarBar>;
|
|
1028
|
+
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.LessThanOrEqual> | Token<TokenKind.GreaterThanOrEqual> | Token<TokenKind.QuestionQuestion> | Keyword<KeywordKind.Or> | Keyword<KeywordKind.And> | Keyword<KeywordKind.Xor> | Token<TokenKind.Ampersand> | Token<TokenKind.Bar> | Token<TokenKind.BarBar> | Token<TokenKind.LessThanLessThan> | Token<TokenKind.GreaterThanGreaterThan> | Token<TokenKind.GreaterThanGreaterThanGreaterThan>;
|
|
999
1029
|
export declare class FunctionLiteral extends BaseNode {
|
|
1000
1030
|
readonly kind = NodeKind.FunctionLiteral;
|
|
1001
1031
|
readonly children: readonly [
|
|
@@ -1134,13 +1164,13 @@ export declare class ConditionalExpression extends BaseNode {
|
|
|
1134
1164
|
get condKeyword(): Keyword<KeywordKind.Cond>;
|
|
1135
1165
|
get openParenthesisToken(): Token<TokenKind.OpenParenthesis>;
|
|
1136
1166
|
get condition(): Expression;
|
|
1137
|
-
get
|
|
1167
|
+
get firstCommaToken(): Comma;
|
|
1138
1168
|
get firstExpression(): Expression;
|
|
1139
|
-
get
|
|
1169
|
+
get secondCommaToken(): Comma | undefined;
|
|
1140
1170
|
get secondExpression(): Expression | undefined;
|
|
1141
1171
|
get closeParenthesisToken(): Token<TokenKind.CloseParenthesis>;
|
|
1142
1172
|
protected get thisAsNode(): Node;
|
|
1143
|
-
constructor(condKeyword: Keyword<KeywordKind.Cond>, openParenthesisToken: Token<TokenKind.OpenParenthesis>, condition: Expression,
|
|
1173
|
+
constructor(condKeyword: Keyword<KeywordKind.Cond>, openParenthesisToken: Token<TokenKind.OpenParenthesis>, condition: Expression, firstCommaToken: Comma, firstExpression: Expression, secondCommaToken: Comma | undefined, secondExpression: Expression | undefined, closeParenthesisToken: Token<TokenKind.CloseParenthesis>, rangeWithTrivia: Range | undefined);
|
|
1144
1174
|
}
|
|
1145
1175
|
export declare class PrefixUnaryExpression extends BaseNode {
|
|
1146
1176
|
readonly kind = NodeKind.PrefixUnaryExpression;
|
|
@@ -1358,7 +1388,7 @@ export declare class AssignmentStatement extends BaseNode {
|
|
|
1358
1388
|
protected get thisAsNode(): Node;
|
|
1359
1389
|
constructor(left: Expression, operator: AssignmentStatementOperator, right: Expression, rangeWithTrivia: Range | undefined);
|
|
1360
1390
|
}
|
|
1361
|
-
export type AssignmentStatementOperator = Token<TokenKind.Equals> | Token<TokenKind.PlusEquals> | Token<TokenKind.MinusEquals> | Token<TokenKind.AsteriskEquals> | Token<TokenKind.SlashEquals> | Token<TokenKind.BackslashEquals>;
|
|
1391
|
+
export type AssignmentStatementOperator = Token<TokenKind.Equals> | Token<TokenKind.PlusEquals> | Token<TokenKind.MinusEquals> | Token<TokenKind.AsteriskEquals> | Token<TokenKind.SlashEquals> | Token<TokenKind.BackslashEquals> | Token<TokenKind.AmpersandEquals> | Token<TokenKind.BarEquals> | Token<TokenKind.BarBarEquals> | Token<TokenKind.LessThanLessThanEquals> | Token<TokenKind.GreaterThanGreaterThanEquals> | Token<TokenKind.GreaterThanGreaterThanGreaterThanEquals>;
|
|
1362
1392
|
export type StatementListParent = FunctionBlock | StatementBlock;
|
|
1363
1393
|
export type StatementListElement = Statement | Semicolon;
|
|
1364
1394
|
export declare class StatementList extends BaseNode {
|
|
@@ -1547,13 +1577,13 @@ export declare class ForStatement extends BaseNode {
|
|
|
1547
1577
|
get parent(): StatementList;
|
|
1548
1578
|
get forKeyword(): Keyword<KeywordKind.For>;
|
|
1549
1579
|
get elementVariableDeclaration(): ForStatementVariableDeclaration;
|
|
1550
|
-
get
|
|
1580
|
+
get commaToken(): Comma | undefined;
|
|
1551
1581
|
get indexVariableDeclaration(): ForStatementVariableDeclaration | undefined;
|
|
1552
1582
|
get fromKeyword(): Keyword<KeywordKind.From>;
|
|
1553
1583
|
get enumeratedExpression(): Expression;
|
|
1554
1584
|
get block(): StatementBlock;
|
|
1555
1585
|
protected get thisAsNode(): Node;
|
|
1556
|
-
constructor(forKeyword: Keyword<KeywordKind.For>, elementVariableDeclaration: ForStatementVariableDeclaration,
|
|
1586
|
+
constructor(forKeyword: Keyword<KeywordKind.For>, elementVariableDeclaration: ForStatementVariableDeclaration, commaToken: Comma | undefined, indexVariableDeclaration: ForStatementVariableDeclaration | undefined, fromKeyword: Keyword<KeywordKind.From>, enumeratedExpression: Expression, block: StatementBlock, rangeWithTrivia: Range | undefined);
|
|
1557
1587
|
}
|
|
1558
1588
|
export declare class IfStatement extends BaseNode {
|
|
1559
1589
|
readonly kind = NodeKind.IfStatement;
|
|
@@ -2270,7 +2300,7 @@ export declare class TypeArgumentList extends BaseNode {
|
|
|
2270
2300
|
protected get thisAsNode(): Node;
|
|
2271
2301
|
constructor(elements: readonly TypeArgumentListElement[], rangeWithTrivia: Range | undefined);
|
|
2272
2302
|
}
|
|
2273
|
-
export type TypeParameterClauseParent = PackageStructuredTypeDeclaration | PackageVariantTypeDeclaration | PackageFunctionTypeDeclaration | PackageAliasTypeDeclaration | PackageFunctionDeclaration | MethodDeclaration | NestedFunctionDeclaration;
|
|
2303
|
+
export type TypeParameterClauseParent = PackageStructuredTypeDeclaration | PackageVariantTypeDeclaration | PackageFunctionTypeDeclaration | PackageAliasTypeDeclaration | PackageReducedTypeDeclaration | PackageFunctionDeclaration | MethodDeclaration | NestedFunctionDeclaration;
|
|
2274
2304
|
export declare class TypeParameterClause extends BaseNode {
|
|
2275
2305
|
readonly kind = NodeKind.TypeParameterClause;
|
|
2276
2306
|
readonly children: readonly [
|
|
@@ -2308,8 +2338,4 @@ export declare class TypeAnnotation extends BaseNode {
|
|
|
2308
2338
|
protected get thisAsNode(): Node;
|
|
2309
2339
|
constructor(colonToken: Token<TokenKind.Colon>, typeSpecifier: TypeSpecifier, rangeWithTrivia: Range | undefined);
|
|
2310
2340
|
}
|
|
2311
|
-
export type Node = Token | Keyword | SourceFile | PackageMemberDeclarationList | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackageName | NamedTypeSpecifier | UnionTypeSpecifier | IntersectionTypeSpecifier | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | MissingTypeSpecifier | AnonymousFunctionTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageFunctionDeclaration | PackageFunctionTypeDeclaration | FunctionTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | MissingPackageMemberDeclaration | TypeMemberGroupDeclaration | ConstructorDeclaration | DestructorDeclaration | IndexedElementGetterDeclaration | IndexedElementSetterDeclaration | IndexParameterClause | DereferencedVariableGetterDeclaration | DereferencedVariableSetterDeclaration | MethodDeclaration | OperatorDeclaration | FieldDeclaration | FieldGetterDeclaration | FieldSetterDeclaration | MissingTypeMemberDeclaration | NestedFunctionDeclaration | LocalVariableDeclaration | ForStatementVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | FunctionLiteral | FunctionBlockLiteral | ArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessExpression | MissingExpression | IsExpression | ParenthesizedExpression | ConditionalExpression | PrefixUnaryExpression | MemberAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | LocalizableTextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | TextLiteral | LocalizableTextLiteral | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | FunctionBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatement | TryStatement | CatchClause | ErrorVariableDeclaration | FinallyClause | ErrorStatement | ImportantStatement | ExpressionStatement | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | ElseClause | MissingStatement | NestedFunctionDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | CaseClause | WhileStatement | YieldStatement | TranslationsDeclaration | TopLevelTranslationList | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexParameterTranslationClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageFunctionTranslationDeclaration | MethodTranslation | FunctionTypeTranslationDeclaration | QualifiedName | PackageVariableTranslationDeclaration | FieldOrVariantTranslation | TypeMemberTranslationList | TypeTranslationDeclaration | TextTranslationDeclaration | TextTranslationFunctionDeclaration | TranslationTextLiteral | TranslationTextTemplate | TranslationTextTemplateSpanList | TranslationTextTemplateSpan | TranslationTextTemplateParameter | VariantValueDeclaration | TypeParameterDeclaration | ParameterDeclaration | Argument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation;
|
|
2312
|
-
type NodesWithChild<Child, Nodes = Node> = Nodes extends {
|
|
2313
|
-
children: readonly (infer C)[];
|
|
2314
|
-
} ? Child extends C ? Nodes : never : never;
|
|
2315
|
-
export {};
|
|
2341
|
+
export type Node = Token | Keyword | SourceFile | PackageMemberDeclarationList | PackageImportDirectiveList | SinglePackageImportDirective | PackageGroupImportDirective | PackageImportList | PackageImport | PackageName | NamedTypeSpecifier | UnionTypeSpecifier | IntersectionTypeSpecifier | ParenthesizedTypeSpecifier | NullableTypeSpecifier | AnonymousTypeSpecifier | MissingTypeSpecifier | AnonymousFunctionTypeDeclaration | AnonymousStructuredTypeDeclaration | AnonymousVariantTypeDeclaration | PackageAliasTypeDeclaration | AliasTypeDeclarationBody | PackageReducedTypeDeclaration | ReducedTypeDeclarationBody | PackageMemberGroupDeclaration | PackageConstructorDeclaration | PackageEntryPointDeclaration | PackageFunctionDeclaration | PackageFunctionTypeDeclaration | FunctionTypeDeclarationBody | BaseTypeList | TypeMemberDeclarationList | TypeMemberDeclarationBlock | PackageStructuredTypeDeclaration | StructuredTypeDeclarationBody | PackageVariableDeclaration | PackageVariableGetterDeclaration | PackageVariableSetterDeclaration | PackageVariantTypeDeclaration | VariantTypeDeclarationBody | TypeExtensionDeclaration | ExtendedTypeClauseCommaList | ExtendedTypeClause | MissingPackageMemberDeclaration | TypeMemberGroupDeclaration | ConstructorDeclaration | DestructorDeclaration | IndexedElementGetterDeclaration | IndexedElementSetterDeclaration | IndexParameterClause | DereferencedVariableGetterDeclaration | DereferencedVariableSetterDeclaration | MethodDeclaration | OperatorDeclaration | FieldDeclaration | FieldGetterDeclaration | FieldSetterDeclaration | MissingTypeMemberDeclaration | NestedFunctionDeclaration | LocalVariableDeclaration | ForStatementVariableDeclaration | ArrayLiteral | ArrayLiteralElementList | AssertionExpression | AssumptionExpression | AsExpression | BinaryExpression | FunctionLiteral | FunctionBlockLiteral | ArgumentList | CallExpression | AutotypeCallExpression | IndexedAccessExpression | MissingExpression | IsExpression | ParenthesizedExpression | ConditionalExpression | PrefixUnaryExpression | MemberAccessExpression | ReferenceExpression | DereferenceExpression | TextTemplateLiteral | LocalizableTextTemplateLiteral | TextTemplateSpanList | TextTemplateSpan | TokenExpression | TextLiteral | LocalizableTextLiteral | KeywordExpression | ObjectExpression | BaseExpression | IdentifierExpression | GenericSpecializationExpression | DefaultMatchExpression | AssignmentStatement | StatementList | StatementBlock | FunctionBlock | BreakLoopStatement | ContinueLoopStatement | DisposeStatement | RunStatement | TryStatement | CatchClause | ErrorVariableDeclaration | FinallyClause | ErrorStatement | ImportantStatement | ExpressionStatement | ForStatement | IfStatement | ElseIfClauseList | ElseIfClause | ElseClause | MissingStatement | NestedFunctionDeclarationStatement | LocalVariableDeclarationStatement | LoopStatement | ReturnStatement | CaseClauseList | SwitchStatement | MatchExpressionList | CaseClause | WhileStatement | YieldStatement | TranslationsDeclaration | TopLevelTranslationList | TranslationParameterList | TranslationParameterClause | ConstructorTranslation | IndexParameterTranslationClause | IndexerTranslation | TranslationTypeParameterList | TranslationTypeParameterClause | PackageFunctionTranslationDeclaration | MethodTranslation | FunctionTypeTranslationDeclaration | QualifiedName | PackageVariableTranslationDeclaration | FieldOrVariantTranslation | TypeMemberTranslationList | TypeTranslationDeclaration | TextTranslationDeclaration | TextTranslationFunctionDeclaration | TranslationTextLiteral | TranslationTextTemplate | TranslationTextTemplateSpanList | TranslationTextTemplateSpan | TranslationTextTemplateParameter | VariantValueDeclaration | TypeParameterDeclaration | ParameterDeclaration | Argument | TagList | Tag | ModifierList | Modifier | ParameterClause | ParameterList | TypeArgumentClause | TypeArgumentList | TypeParameterClause | TypeParameterList | TypeAnnotation;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Node } from './Nodes.js';
|
|
2
|
+
/**
|
|
3
|
+
* Проверяет, что тип узла совместим с типом родительского узла всех дочерних узлов.
|
|
4
|
+
*/
|
|
5
|
+
export type IsCorrectParent<Parent, Children> = Children extends readonly [infer FirstChild, ...infer RemainingChildren] ? (FirstChild extends Node ? (IsAssignableTo<Parent, FirstChild['parent']> extends true ? IsCorrectParent<Parent, RemainingChildren> : IsAssignableTo<Parent, FirstChild['parent']>) : FirstChild extends undefined ? true : 'Ожидалось, что типом FirstChild будет Node или undefined.') : Children extends readonly (infer ListElement)[] ? (ListElement extends Node ? IsAssignableTo<Parent, ListElement['parent']> : ListElement extends undefined ? true : 'Ожидалось, что типом ListElement будет Node или undefined.') : Children extends readonly [] ? true : 'Ожидался пустой кортеж.';
|
|
6
|
+
export type IsAssignableTo<Source, Target> = Source extends Target ? true : ['Тип', Source, 'не совместим с типом', Target];
|
|
7
|
+
export type NodesWithChild<Child, Nodes = Node> = Nodes extends {
|
|
8
|
+
children: readonly (infer C)[];
|
|
9
|
+
} ? Child extends C ? Nodes : never : never;
|
|
@@ -16,13 +16,16 @@ export declare enum OperatorKind {
|
|
|
16
16
|
Xor = 13,
|
|
17
17
|
BitwiseAnd = 14,
|
|
18
18
|
BitwiseOr = 15,
|
|
19
|
-
BitwiseXor = 16
|
|
19
|
+
BitwiseXor = 16,
|
|
20
|
+
LeftShift = 17,
|
|
21
|
+
SignedRightShift = 18,
|
|
22
|
+
UnsignedRightShift = 19
|
|
20
23
|
}
|
|
21
|
-
export declare const operatorKinds: readonly [OperatorKind.Plus, OperatorKind.Minus, OperatorKind.Not, OperatorKind.Multiply, OperatorKind.Divide, OperatorKind.IntegerDivide, OperatorKind.Modulo, OperatorKind.LessThan, OperatorKind.GreaterThan, OperatorKind.LessThanOrEqual, OperatorKind.GreaterThanOrEqual, OperatorKind.Or, OperatorKind.And, OperatorKind.Xor, OperatorKind.BitwiseAnd, OperatorKind.BitwiseOr, OperatorKind.BitwiseXor];
|
|
24
|
+
export declare const operatorKinds: readonly [OperatorKind.Plus, OperatorKind.Minus, OperatorKind.Not, OperatorKind.Multiply, OperatorKind.Divide, OperatorKind.IntegerDivide, OperatorKind.Modulo, OperatorKind.LessThan, OperatorKind.GreaterThan, OperatorKind.LessThanOrEqual, OperatorKind.GreaterThanOrEqual, OperatorKind.Or, OperatorKind.And, OperatorKind.Xor, OperatorKind.BitwiseAnd, OperatorKind.BitwiseOr, OperatorKind.BitwiseXor, OperatorKind.LeftShift, OperatorKind.SignedRightShift, OperatorKind.UnsignedRightShift];
|
|
22
25
|
/**
|
|
23
26
|
* Виды операторов, задаваемых токенами (`+`, `-`, `*=` и др.).
|
|
24
27
|
*/
|
|
25
|
-
export type KindOfOperatorDefinedByToken = OperatorKind.Plus | OperatorKind.Minus | OperatorKind.Multiply | OperatorKind.Divide | OperatorKind.IntegerDivide | OperatorKind.Modulo | OperatorKind.LessThan | OperatorKind.GreaterThan | OperatorKind.LessThanOrEqual | OperatorKind.GreaterThanOrEqual | OperatorKind.BitwiseAnd | OperatorKind.BitwiseOr | OperatorKind.BitwiseXor;
|
|
28
|
+
export type KindOfOperatorDefinedByToken = OperatorKind.Plus | OperatorKind.Minus | OperatorKind.Multiply | OperatorKind.Divide | OperatorKind.IntegerDivide | OperatorKind.Modulo | OperatorKind.LessThan | OperatorKind.GreaterThan | OperatorKind.LessThanOrEqual | OperatorKind.GreaterThanOrEqual | OperatorKind.BitwiseAnd | OperatorKind.BitwiseOr | OperatorKind.BitwiseXor | OperatorKind.LeftShift | OperatorKind.SignedRightShift | OperatorKind.UnsignedRightShift;
|
|
26
29
|
export declare function isOperatorDefinedByToken(kind: OperatorKind): kind is KindOfOperatorDefinedByToken;
|
|
27
30
|
/**
|
|
28
31
|
* Виды операторов, задаваемых ключевыми словами (`и`, `или`, `не` и др.)
|