@@ -224,9 +224,9 @@ namespace ts {
224224 * @param visitor The callback used to visit each child.
225225 * @param context A lexical environment context for the visitor.
226226 */
227- export function visitEachChild < T extends Node > ( node : T | undefined , visitor : Visitor , context : TransformationContext , nodesVisitor ?: typeof visitNodes ) : T | undefined ;
227+ export function visitEachChild < T extends Node > ( node : T | undefined , visitor : Visitor , context : TransformationContext , nodesVisitor ?: typeof visitNodes , tokenVisitor ?: Visitor ) : T | undefined ;
228228
229- export function visitEachChild ( node : Node , visitor : Visitor , context : TransformationContext , nodesVisitor = visitNodes ) : Node {
229+ export function visitEachChild ( node : Node , visitor : Visitor , context : TransformationContext , nodesVisitor = visitNodes , tokenVisitor ?: Visitor ) : Node {
230230 if ( node === undefined ) {
231231 return undefined ;
232232 }
@@ -274,7 +274,7 @@ namespace ts {
274274 visitParameterList ( ( < SignatureDeclaration & TypeElement > node ) . parameters , visitor , context , nodesVisitor ) ,
275275 visitNode ( ( < SignatureDeclaration & TypeElement > node ) . type , visitor , isTypeNode ) ,
276276 visitNode ( ( < SignatureDeclaration & TypeElement > node ) . name , visitor , isPropertyName ) ,
277- visitNode ( ( < SignatureDeclaration & TypeElement > node ) . questionToken , visitor , isToken ) ) ;
277+ visitNode ( ( < SignatureDeclaration & TypeElement > node ) . questionToken , tokenVisitor , isToken ) ) ;
278278
279279 case SyntaxKind . IndexSignature :
280280 return updateIndexSignatureDeclaration ( < IndexSignatureDeclaration > node ,
@@ -287,9 +287,9 @@ namespace ts {
287287 return updateParameter ( < ParameterDeclaration > node ,
288288 nodesVisitor ( ( < ParameterDeclaration > node ) . decorators , visitor , isDecorator ) ,
289289 nodesVisitor ( ( < ParameterDeclaration > node ) . modifiers , visitor , isModifier ) ,
290- visitNode ( ( < ParameterDeclaration > node ) . dotDotDotToken , visitor ) ,
290+ visitNode ( ( < ParameterDeclaration > node ) . dotDotDotToken , tokenVisitor , isToken ) ,
291291 visitNode ( ( < ParameterDeclaration > node ) . name , visitor , isBindingName ) ,
292- visitNode ( ( < ParameterDeclaration > node ) . questionToken , visitor , isToken ) ,
292+ visitNode ( ( < ParameterDeclaration > node ) . questionToken , tokenVisitor , isToken ) ,
293293 visitNode ( ( < ParameterDeclaration > node ) . type , visitor , isTypeNode ) ,
294294 visitNode ( ( < ParameterDeclaration > node ) . initializer , visitor , isExpression ) ) ;
295295
@@ -335,9 +335,9 @@ namespace ts {
335335 visitNode ( ( < IndexedAccessTypeNode > node ) . indexType , visitor , isTypeNode ) ) ;
336336 case SyntaxKind . MappedType :
337337 return updateMappedTypeNode ( ( < MappedTypeNode > node ) ,
338- visitNode ( ( < MappedTypeNode > node ) . readonlyToken , visitor , isToken ) ,
338+ visitNode ( ( < MappedTypeNode > node ) . readonlyToken , tokenVisitor , isToken ) ,
339339 visitNode ( ( < MappedTypeNode > node ) . typeParameter , visitor , isTypeParameter ) ,
340- visitNode ( ( < MappedTypeNode > node ) . questionToken , visitor , isToken ) ,
340+ visitNode ( ( < MappedTypeNode > node ) . questionToken , tokenVisitor , isToken ) ,
341341 visitNode ( ( < MappedTypeNode > node ) . type , visitor , isTypeNode ) ) ;
342342
343343 case SyntaxKind . LiteralType :
@@ -357,7 +357,7 @@ namespace ts {
357357 case SyntaxKind . PropertySignature :
358358 return updatePropertySignature ( ( < PropertySignature > node ) ,
359359 visitNode ( ( < PropertySignature > node ) . name , visitor , isPropertyName ) ,
360- visitNode ( ( < PropertySignature > node ) . questionToken , visitor , isToken ) ,
360+ visitNode ( ( < PropertySignature > node ) . questionToken , tokenVisitor , isToken ) ,
361361 visitNode ( ( < PropertySignature > node ) . type , visitor , isTypeNode ) ,
362362 visitNode ( ( < PropertySignature > node ) . initializer , visitor , isExpression ) ) ;
363363
@@ -380,9 +380,9 @@ namespace ts {
380380 return updateMethod ( < MethodDeclaration > node ,
381381 nodesVisitor ( ( < MethodDeclaration > node ) . decorators , visitor , isDecorator ) ,
382382 nodesVisitor ( ( < MethodDeclaration > node ) . modifiers , visitor , isModifier ) ,
383- visitNode ( ( < MethodDeclaration > node ) . asteriskToken , visitor , isToken ) ,
383+ visitNode ( ( < MethodDeclaration > node ) . asteriskToken , tokenVisitor , isToken ) ,
384384 visitNode ( ( < MethodDeclaration > node ) . name , visitor , isPropertyName ) ,
385- visitNode ( ( < MethodDeclaration > node ) . questionToken , visitor , isToken ) ,
385+ visitNode ( ( < MethodDeclaration > node ) . questionToken , tokenVisitor , isToken ) ,
386386 nodesVisitor ( ( < MethodDeclaration > node ) . typeParameters , visitor , isTypeParameter ) ,
387387 visitParameterList ( ( < MethodDeclaration > node ) . parameters , visitor , context , nodesVisitor ) ,
388388 visitNode ( ( < MethodDeclaration > node ) . type , visitor , isTypeNode ) ,
@@ -423,7 +423,7 @@ namespace ts {
423423
424424 case SyntaxKind . BindingElement :
425425 return updateBindingElement ( < BindingElement > node ,
426- ( < BindingElement > node ) . dotDotDotToken ,
426+ visitNode ( ( < BindingElement > node ) . dotDotDotToken , tokenVisitor , isToken ) ,
427427 visitNode ( ( < BindingElement > node ) . propertyName , visitor , isPropertyName ) ,
428428 visitNode ( ( < BindingElement > node ) . name , visitor , isBindingName ) ,
429429 visitNode ( ( < BindingElement > node ) . initializer , visitor , isExpression ) ) ;
@@ -476,7 +476,7 @@ namespace ts {
476476 case SyntaxKind . FunctionExpression :
477477 return updateFunctionExpression ( < FunctionExpression > node ,
478478 nodesVisitor ( ( < FunctionExpression > node ) . modifiers , visitor , isModifier ) ,
479- ( < FunctionExpression > node ) . asteriskToken ,
479+ visitNode ( ( < FunctionExpression > node ) . asteriskToken , tokenVisitor , isToken ) ,
480480 visitNode ( ( < FunctionExpression > node ) . name , visitor , isIdentifier ) ,
481481 nodesVisitor ( ( < FunctionExpression > node ) . typeParameters , visitor , isTypeParameter ) ,
482482 visitParameterList ( ( < FunctionExpression > node ) . parameters , visitor , context , nodesVisitor ) ,
@@ -533,7 +533,7 @@ namespace ts {
533533
534534 case SyntaxKind . YieldExpression :
535535 return updateYield ( < YieldExpression > node ,
536- ( < YieldExpression > node ) . asteriskToken ,
536+ visitNode ( ( < YieldExpression > node ) . asteriskToken , tokenVisitor , isToken ) ,
537537 visitNode ( ( < YieldExpression > node ) . expression , visitor , isExpression ) ) ;
538538
539539 case SyntaxKind . SpreadElement :
@@ -669,7 +669,7 @@ namespace ts {
669669 return updateFunctionDeclaration ( < FunctionDeclaration > node ,
670670 nodesVisitor ( ( < FunctionDeclaration > node ) . decorators , visitor , isDecorator ) ,
671671 nodesVisitor ( ( < FunctionDeclaration > node ) . modifiers , visitor , isModifier ) ,
672- ( < FunctionDeclaration > node ) . asteriskToken ,
672+ visitNode ( ( < FunctionDeclaration > node ) . asteriskToken , tokenVisitor , isToken ) ,
673673 visitNode ( ( < FunctionDeclaration > node ) . name , visitor , isIdentifier ) ,
674674 nodesVisitor ( ( < FunctionDeclaration > node ) . typeParameters , visitor , isTypeParameter ) ,
675675 visitParameterList ( ( < FunctionDeclaration > node ) . parameters , visitor , context , nodesVisitor ) ,
0 commit comments