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

Function writeBreakWhenFalse

test/fixtures/snapshot/typescript.js:104299–104304  ·  view source on GitHub ↗

* Writes a BreakWhenFalse operation to the current label's statement list. * * @param label The label for the Break. * @param condition The condition for the Break. * @param operationLocation The source map location for the operation.

(label, condition, operationLocation)

Source from the content-addressed store, hash-verified

104297 * @param operationLocation The source map location for the operation.
104298 */
104299 function writeBreakWhenFalse(label, condition, operationLocation) {
104300 writeStatement(ts.setEmitFlags(factory.createIfStatement(factory.createLogicalNot(condition), ts.setEmitFlags(ts.setTextRange(factory.createReturnStatement(factory.createArrayLiteralExpression([
104301 createInstruction(3 /* Instruction.Break */),
104302 createLabel(label)
104303 ])), operationLocation), 384 /* EmitFlags.NoTokenSourceMaps */)), 1 /* EmitFlags.SingleLine */));
104304 }
104305 /**
104306 * Writes a Yield operation to the current label's statement list.
104307 *

Callers 1

writeOperationFunction · 0.85

Calls 3

writeStatementFunction · 0.85
createInstructionFunction · 0.85
createLabelFunction · 0.85

Tested by

no test coverage detected