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

Function writeBreakWhenTrue

test/fixtures/snapshot/typescript.js:104286–104291  ·  view source on GitHub ↗

* Writes a BreakWhenTrue 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

104284 * @param operationLocation The source map location for the operation.
104285 */
104286 function writeBreakWhenTrue(label, condition, operationLocation) {
104287 writeStatement(ts.setEmitFlags(factory.createIfStatement(condition, ts.setEmitFlags(ts.setTextRange(factory.createReturnStatement(factory.createArrayLiteralExpression([
104288 createInstruction(3 /* Instruction.Break */),
104289 createLabel(label)
104290 ])), operationLocation), 384 /* EmitFlags.NoTokenSourceMaps */)), 1 /* EmitFlags.SingleLine */));
104291 }
104292 /**
104293 * Writes a BreakWhenFalse operation to the current label's statement list.
104294 *

Callers 1

writeOperationFunction · 0.85

Calls 3

writeStatementFunction · 0.85
createInstructionFunction · 0.85
createLabelFunction · 0.85

Tested by

no test coverage detected