* Visits a node that is contained within a generator function. * * @param node The node to visit.
(node)
| 102045 | * @param node The node to visit. |
| 102046 | */ |
| 102047 | function visitJavaScriptInGeneratorFunctionBody(node) { |
| 102048 | switch (node.kind) { |
| 102049 | case 256 /* SyntaxKind.FunctionDeclaration */: |
| 102050 | return visitFunctionDeclaration(node); |
| 102051 | case 213 /* SyntaxKind.FunctionExpression */: |
| 102052 | return visitFunctionExpression(node); |
| 102053 | case 172 /* SyntaxKind.GetAccessor */: |
| 102054 | case 173 /* SyntaxKind.SetAccessor */: |
| 102055 | return visitAccessorDeclaration(node); |
| 102056 | case 237 /* SyntaxKind.VariableStatement */: |
| 102057 | return visitVariableStatement(node); |
| 102058 | case 242 /* SyntaxKind.ForStatement */: |
| 102059 | return visitForStatement(node); |
| 102060 | case 243 /* SyntaxKind.ForInStatement */: |
| 102061 | return visitForInStatement(node); |
| 102062 | case 246 /* SyntaxKind.BreakStatement */: |
| 102063 | return visitBreakStatement(node); |
| 102064 | case 245 /* SyntaxKind.ContinueStatement */: |
| 102065 | return visitContinueStatement(node); |
| 102066 | case 247 /* SyntaxKind.ReturnStatement */: |
| 102067 | return visitReturnStatement(node); |
| 102068 | default: |
| 102069 | if (node.transformFlags & 524288 /* TransformFlags.ContainsYield */) { |
| 102070 | return visitJavaScriptContainingYield(node); |
| 102071 | } |
| 102072 | else if (node.transformFlags & (2048 /* TransformFlags.ContainsGenerator */ | 2097152 /* TransformFlags.ContainsHoistedDeclarationOrCompletion */)) { |
| 102073 | return ts.visitEachChild(node, visitor, context); |
| 102074 | } |
| 102075 | else { |
| 102076 | return node; |
| 102077 | } |
| 102078 | } |
| 102079 | } |
| 102080 | /** |
| 102081 | * Visits a node that contains a YieldExpression. |
| 102082 | * |
no test coverage detected
searching dependent graphs…