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

Function writeYield

test/fixtures/snapshot/typescript.js:104311–104316  ·  view source on GitHub ↗

* Writes a Yield operation to the current label's statement list. * * @param expression The expression to yield. * @param operationLocation The source map location for the operation.

(expression, operationLocation)

Source from the content-addressed store, hash-verified

104309 * @param operationLocation The source map location for the operation.
104310 */
104311 function writeYield(expression, operationLocation) {
104312 lastOperationWasAbrupt = true;
104313 writeStatement(ts.setEmitFlags(ts.setTextRange(factory.createReturnStatement(factory.createArrayLiteralExpression(expression
104314 ? [createInstruction(4 /* Instruction.Yield */), expression]
104315 : [createInstruction(4 /* Instruction.Yield */)])), operationLocation), 384 /* EmitFlags.NoTokenSourceMaps */));
104316 }
104317 /**
104318 * Writes a YieldStar instruction to the current label's statement list.
104319 *

Callers 1

writeOperationFunction · 0.85

Calls 2

writeStatementFunction · 0.85
createInstructionFunction · 0.85

Tested by

no test coverage detected