Skip to content

Commit 951ce55

Browse files
committed
Merge branch 'transforms-printer' into transforms-transformer-ts
2 parents 02b85f8 + 75b2181 commit 951ce55

1 file changed

Lines changed: 2 additions & 22 deletions

File tree

src/compiler/visitor.ts

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,8 @@ namespace ts {
503503
return node;
504504
}
505505

506-
if (lift !== undefined && visited !== undefined && isNodeArrayNode(visited)) {
507-
visited = lift((<NodeArrayNode<Node>>visited).nodes);
506+
if (visited !== undefined && isNodeArrayNode(visited)) {
507+
visited = (lift || extractSingleNode)((<NodeArrayNode<Node>>visited).nodes);
508508
}
509509

510510
if (parenthesize !== undefined && visited !== undefined) {
@@ -856,26 +856,6 @@ namespace ts {
856856
return createNodeArray(concatenate(statements, declarations), /*location*/ statements);
857857
}
858858

859-
/**
860-
* Tries to lift a NodeArrayNode to a Node. This is primarily used to
861-
* lift multiple statements into a single Block.
862-
*
863-
* @param node The visited Node.
864-
* @param options Options used to control lift behavior.
865-
*/
866-
function liftNode(node: Node, lifter: (nodes: NodeArray<Node>) => Node): Node {
867-
if (node === undefined) {
868-
return undefined;
869-
}
870-
else if (isNodeArrayNode(node)) {
871-
const lift = lifter || extractSingleNode;
872-
return lift(node.nodes);
873-
}
874-
else {
875-
return node;
876-
}
877-
}
878-
879859
/**
880860
* Lifts a NodeArray containing only Statement nodes to a block.
881861
*

0 commit comments

Comments
 (0)