@@ -86,249 +86,249 @@ export class BaseVisitor extends AbstractVisitor<Node> {
86
86
87
87
protected _visit ( node : Node ) : void {
88
88
switch ( node . kind ) {
89
- case NodeKind . SOURCE : {
89
+ case NodeKind . Source : {
90
90
this . visitSource ( < Source > node ) ;
91
91
break ;
92
92
}
93
93
94
94
// types
95
95
96
- case NodeKind . NAMEDTYPE : {
96
+ case NodeKind . NamedType : {
97
97
this . visitNamedTypeNode ( < NamedTypeNode > node ) ;
98
98
break ;
99
99
}
100
- case NodeKind . FUNCTIONTYPE : {
100
+ case NodeKind . FunctionType : {
101
101
this . visitFunctionTypeNode ( < FunctionTypeNode > node ) ;
102
102
break ;
103
103
}
104
- case NodeKind . TYPENAME : {
104
+ case NodeKind . TypeName : {
105
105
this . visitTypeName ( < TypeName > node ) ;
106
106
}
107
- case NodeKind . TYPEPARAMETER : {
107
+ case NodeKind . TypeParameter : {
108
108
this . visitTypeParameter ( < TypeParameterNode > node ) ;
109
109
break ;
110
110
}
111
111
112
112
// expressions
113
113
114
- case NodeKind . FALSE :
115
- case NodeKind . NULL :
116
- case NodeKind . SUPER :
117
- case NodeKind . THIS :
118
- case NodeKind . TRUE :
119
- case NodeKind . CONSTRUCTOR :
120
- case NodeKind . IDENTIFIER : {
114
+ case NodeKind . False :
115
+ case NodeKind . Null :
116
+ case NodeKind . Super :
117
+ case NodeKind . This :
118
+ case NodeKind . True :
119
+ case NodeKind . Constructor :
120
+ case NodeKind . Identifier : {
121
121
this . visitIdentifierExpression ( < IdentifierExpression > node ) ;
122
122
break ;
123
123
}
124
- case NodeKind . ASSERTION : {
124
+ case NodeKind . Assertion : {
125
125
this . visitAssertionExpression ( < AssertionExpression > node ) ;
126
126
break ;
127
127
}
128
- case NodeKind . BINARY : {
128
+ case NodeKind . Binary : {
129
129
this . visitBinaryExpression ( < BinaryExpression > node ) ;
130
130
break ;
131
131
}
132
- case NodeKind . CALL : {
132
+ case NodeKind . Call : {
133
133
this . visitCallExpression ( < CallExpression > node ) ;
134
134
break ;
135
135
}
136
- case NodeKind . CLASS : {
136
+ case NodeKind . Class : {
137
137
this . visitClassExpression ( < ClassExpression > node ) ;
138
138
break ;
139
139
}
140
- case NodeKind . COMMA : {
140
+ case NodeKind . Comma : {
141
141
this . visitCommaExpression ( < CommaExpression > node ) ;
142
142
break ;
143
143
}
144
- case NodeKind . ELEMENTACCESS : {
144
+ case NodeKind . ElementAccess : {
145
145
this . visitElementAccessExpression (
146
146
< ElementAccessExpression > node
147
147
) ;
148
148
break ;
149
149
}
150
- case NodeKind . FUNCTION : {
150
+ case NodeKind . Function : {
151
151
this . visitFunctionExpression ( < FunctionExpression > node ) ;
152
152
break ;
153
153
}
154
- case NodeKind . INSTANCEOF : {
154
+ case NodeKind . InstanceOf : {
155
155
this . visitInstanceOfExpression ( < InstanceOfExpression > node ) ;
156
156
break ;
157
157
}
158
- case NodeKind . LITERAL : {
158
+ case NodeKind . Literal : {
159
159
this . visitLiteralExpression ( < LiteralExpression > node ) ;
160
160
break ;
161
161
}
162
- case NodeKind . NEW : {
162
+ case NodeKind . New : {
163
163
this . visitNewExpression ( < NewExpression > node ) ;
164
164
break ;
165
165
}
166
- case NodeKind . PARENTHESIZED : {
166
+ case NodeKind . Parenthesized : {
167
167
this . visitParenthesizedExpression (
168
168
< ParenthesizedExpression > node
169
169
) ;
170
170
break ;
171
171
}
172
- case NodeKind . PROPERTYACCESS : {
172
+ case NodeKind . PropertyAccess : {
173
173
this . visitPropertyAccessExpression (
174
174
< PropertyAccessExpression > node
175
175
) ;
176
176
break ;
177
177
}
178
- case NodeKind . TERNARY : {
178
+ case NodeKind . Ternary : {
179
179
this . visitTernaryExpression ( < TernaryExpression > node ) ;
180
180
break ;
181
181
}
182
- case NodeKind . UNARYPOSTFIX : {
182
+ case NodeKind . UnaryPostfix : {
183
183
this . visitUnaryPostfixExpression ( < UnaryPostfixExpression > node ) ;
184
184
break ;
185
185
}
186
- case NodeKind . UNARYPREFIX : {
186
+ case NodeKind . UnaryPrefix : {
187
187
this . visitUnaryPrefixExpression ( < UnaryPrefixExpression > node ) ;
188
188
break ;
189
189
}
190
190
191
191
// statements
192
192
193
- case NodeKind . BLOCK : {
193
+ case NodeKind . Block : {
194
194
this . visitBlockStatement ( < BlockStatement > node ) ;
195
195
break ;
196
196
}
197
- case NodeKind . BREAK : {
197
+ case NodeKind . Break : {
198
198
this . visitBreakStatement ( < BreakStatement > node ) ;
199
199
break ;
200
200
}
201
- case NodeKind . CONTINUE : {
201
+ case NodeKind . Continue : {
202
202
this . visitContinueStatement ( < ContinueStatement > node ) ;
203
203
break ;
204
204
}
205
- case NodeKind . DO : {
205
+ case NodeKind . Do : {
206
206
this . visitDoStatement ( < DoStatement > node ) ;
207
207
break ;
208
208
}
209
- case NodeKind . EMPTY : {
209
+ case NodeKind . Empty : {
210
210
this . visitEmptyStatement ( < EmptyStatement > node ) ;
211
211
break ;
212
212
}
213
- case NodeKind . EXPORT : {
213
+ case NodeKind . Export : {
214
214
this . visitExportStatement ( < ExportStatement > node ) ;
215
215
break ;
216
216
}
217
- case NodeKind . EXPORTDEFAULT : {
217
+ case NodeKind . ExportDefault : {
218
218
this . visitExportDefaultStatement ( < ExportDefaultStatement > node ) ;
219
219
break ;
220
220
}
221
- case NodeKind . EXPORTIMPORT : {
221
+ case NodeKind . ExportImport : {
222
222
this . visitExportImportStatement ( < ExportImportStatement > node ) ;
223
223
break ;
224
224
}
225
- case NodeKind . EXPRESSION : {
225
+ case NodeKind . Expression : {
226
226
this . visitExpressionStatement ( < ExpressionStatement > node ) ;
227
227
break ;
228
228
}
229
- case NodeKind . FOR : {
229
+ case NodeKind . For : {
230
230
this . visitForStatement ( < ForStatement > node ) ;
231
231
break ;
232
232
}
233
- case NodeKind . IF : {
233
+ case NodeKind . If : {
234
234
this . visitIfStatement ( < IfStatement > node ) ;
235
235
break ;
236
236
}
237
- case NodeKind . IMPORT : {
237
+ case NodeKind . Import : {
238
238
this . visitImportStatement ( < ImportStatement > node ) ;
239
239
break ;
240
240
}
241
- case NodeKind . RETURN : {
241
+ case NodeKind . Return : {
242
242
this . visitReturnStatement ( < ReturnStatement > node ) ;
243
243
break ;
244
244
}
245
- case NodeKind . SWITCH : {
245
+ case NodeKind . Switch : {
246
246
this . visitSwitchStatement ( < SwitchStatement > node ) ;
247
247
break ;
248
248
}
249
- case NodeKind . THROW : {
249
+ case NodeKind . Throw : {
250
250
this . visitThrowStatement ( < ThrowStatement > node ) ;
251
251
break ;
252
252
}
253
- case NodeKind . TRY : {
253
+ case NodeKind . Try : {
254
254
this . visitTryStatement ( < TryStatement > node ) ;
255
255
break ;
256
256
}
257
- case NodeKind . VARIABLE : {
257
+ case NodeKind . Variable : {
258
258
this . visitVariableStatement ( < VariableStatement > node ) ;
259
259
break ;
260
260
}
261
- case NodeKind . WHILE : {
261
+ case NodeKind . While : {
262
262
this . visitWhileStatement ( < WhileStatement > node ) ;
263
263
break ;
264
264
}
265
265
266
266
// declaration statements
267
267
268
- case NodeKind . CLASSDECLARATION : {
268
+ case NodeKind . ClassDeclaration : {
269
269
this . visitClassDeclaration ( < ClassDeclaration > node ) ;
270
270
break ;
271
271
}
272
- case NodeKind . ENUMDECLARATION : {
272
+ case NodeKind . EnumDeclaration : {
273
273
this . visitEnumDeclaration ( < EnumDeclaration > node ) ;
274
274
break ;
275
275
}
276
- case NodeKind . ENUMVALUEDECLARATION : {
276
+ case NodeKind . EnumValueDeclaration : {
277
277
this . visitEnumValueDeclaration ( < EnumValueDeclaration > node ) ;
278
278
break ;
279
279
}
280
- case NodeKind . FIELDDECLARATION : {
280
+ case NodeKind . FieldDeclaration : {
281
281
this . visitFieldDeclaration ( < FieldDeclaration > node ) ;
282
282
break ;
283
283
}
284
- case NodeKind . FUNCTIONDECLARATION : {
284
+ case NodeKind . FunctionDeclaration : {
285
285
this . visitFunctionDeclaration ( < FunctionDeclaration > node ) ;
286
286
break ;
287
287
}
288
- case NodeKind . IMPORTDECLARATION : {
288
+ case NodeKind . ImportDeclaration : {
289
289
this . visitImportDeclaration ( < ImportDeclaration > node ) ;
290
290
break ;
291
291
}
292
- case NodeKind . INTERFACEDECLARATION : {
292
+ case NodeKind . InterfaceDeclaration : {
293
293
this . visitInterfaceDeclaration ( < InterfaceDeclaration > node ) ;
294
294
break ;
295
295
}
296
- case NodeKind . METHODDECLARATION : {
296
+ case NodeKind . MethodDeclaration : {
297
297
this . visitMethodDeclaration ( < MethodDeclaration > node ) ;
298
298
break ;
299
299
}
300
- case NodeKind . NAMESPACEDECLARATION : {
300
+ case NodeKind . NamespaceDeclaration : {
301
301
this . visitNamespaceDeclaration ( < NamespaceDeclaration > node ) ;
302
302
break ;
303
303
}
304
- case NodeKind . TYPEDECLARATION : {
304
+ case NodeKind . TypeDeclaration : {
305
305
this . visitTypeDeclaration ( < TypeDeclaration > node ) ;
306
306
break ;
307
307
}
308
- case NodeKind . VARIABLEDECLARATION : {
308
+ case NodeKind . VariableDeclaration : {
309
309
this . visitVariableDeclaration ( < VariableDeclaration > node ) ;
310
310
break ;
311
311
}
312
312
313
313
// other
314
314
315
- case NodeKind . DECORATOR : {
315
+ case NodeKind . Decorator : {
316
316
this . visitDecoratorNode ( < DecoratorNode > node ) ;
317
317
break ;
318
318
}
319
- case NodeKind . EXPORTMEMBER : {
319
+ case NodeKind . ExportMember : {
320
320
this . visitExportMember ( < ExportMember > node ) ;
321
321
break ;
322
322
}
323
- case NodeKind . PARAMETER : {
323
+ case NodeKind . Parameter : {
324
324
this . visitParameter ( < ParameterNode > node ) ;
325
325
break ;
326
326
}
327
- case NodeKind . SWITCHCASE : {
327
+ case NodeKind . SwitchCase : {
328
328
this . visitSwitchCase ( < SwitchCase > node ) ;
329
329
break ;
330
330
}
331
- case NodeKind . INDEXSIGNATURE : {
331
+ case NodeKind . IndexSignature : {
332
332
this . visitIndexSignature ( < IndexSignatureNode > node ) ;
333
333
break ;
334
334
}
@@ -419,39 +419,39 @@ export class BaseVisitor extends AbstractVisitor<Node> {
419
419
420
420
visitLiteralExpression ( node : LiteralExpression ) : void {
421
421
switch ( node . literalKind ) {
422
- case LiteralKind . FLOAT : {
422
+ case LiteralKind . Float : {
423
423
this . visitFloatLiteralExpression ( < FloatLiteralExpression > node ) ;
424
424
break ;
425
425
}
426
- case LiteralKind . INTEGER : {
426
+ case LiteralKind . Integer : {
427
427
this . visitIntegerLiteralExpression (
428
428
< IntegerLiteralExpression > node
429
429
) ;
430
430
break ;
431
431
}
432
- case LiteralKind . STRING : {
432
+ case LiteralKind . String : {
433
433
this . visitStringLiteralExpression (
434
434
< StringLiteralExpression > node
435
435
) ;
436
436
break ;
437
437
}
438
- case LiteralKind . TEMPLATE : {
438
+ case LiteralKind . Template : {
439
439
this . visitTemplateLiteralExpression (
440
440
< TemplateLiteralExpression > node
441
441
) ;
442
442
break ;
443
443
}
444
- case LiteralKind . REGEXP : {
444
+ case LiteralKind . RegExp : {
445
445
this . visitRegexpLiteralExpression (
446
446
< RegexpLiteralExpression > node
447
447
) ;
448
448
break ;
449
449
}
450
- case LiteralKind . ARRAY : {
450
+ case LiteralKind . Array : {
451
451
this . visitArrayLiteralExpression ( < ArrayLiteralExpression > node ) ;
452
452
break ;
453
453
}
454
- case LiteralKind . OBJECT : {
454
+ case LiteralKind . Object : {
455
455
this . visitObjectLiteralExpression (
456
456
< ObjectLiteralExpression > node
457
457
) ;
@@ -560,7 +560,7 @@ export class BaseVisitor extends AbstractVisitor<Node> {
560
560
561
561
visitDoStatement ( node : DoStatement ) : void {
562
562
this . visit ( node . condition ) ;
563
- this . visit ( node . statement ) ;
563
+ this . visit ( node . body ) ;
564
564
}
565
565
566
566
visitEmptyStatement ( node : EmptyStatement ) : void { }
@@ -610,7 +610,7 @@ export class BaseVisitor extends AbstractVisitor<Node> {
610
610
this . visit ( node . initializer ) ;
611
611
this . visit ( node . condition ) ;
612
612
this . visit ( node . incrementor ) ;
613
- this . visit ( node . statement ) ;
613
+ this . visit ( node . body ) ;
614
614
}
615
615
616
616
visitFunctionDeclaration (
@@ -701,7 +701,7 @@ export class BaseVisitor extends AbstractVisitor<Node> {
701
701
}
702
702
703
703
visitTryStatement ( node : TryStatement ) : void {
704
- this . visit ( node . statements ) ;
704
+ this . visit ( node . bodyStatements ) ;
705
705
this . visit ( node . catchVariable ) ;
706
706
this . visit ( node . catchStatements ) ;
707
707
this . visit ( node . finallyStatements ) ;
@@ -728,7 +728,7 @@ export class BaseVisitor extends AbstractVisitor<Node> {
728
728
visitWhileStatement ( node : WhileStatement ) : void {
729
729
this . visit ( node . condition ) ;
730
730
this . depth ++ ;
731
- this . visit ( node . statement ) ;
731
+ this . visit ( node . body ) ;
732
732
this . depth -- ;
733
733
}
734
734
0 commit comments