MCPcopy Index your code
hub / github.com/nodejs/node / transformAndEmitBreakStatement

Function transformAndEmitBreakStatement

test/fixtures/snapshot/typescript.js:103101–103110  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

103099 return ts.visitEachChild(node, visitor, context);
103100 }
103101 function transformAndEmitBreakStatement(node) {
103102 var label = findBreakTarget(node.label ? ts.idText(node.label) : undefined);
103103 if (label > 0) {
103104 emitBreak(label, /*location*/ node);
103105 }
103106 else {
103107 // invalid break without a containing loop, switch, or labeled statement. Leave the node as is, per #17875.
103108 emitStatement(node);
103109 }
103110 }
103111 function visitBreakStatement(node) {
103112 if (inStatementContainingYield) {
103113 var label = findBreakTarget(node.label && ts.idText(node.label));

Callers 1

Calls 3

findBreakTargetFunction · 0.85
emitBreakFunction · 0.85
emitStatementFunction · 0.85

Tested by

no test coverage detected