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

Function findContinueTarget

test/fixtures/snapshot/typescript.js:103743–103763  ·  view source on GitHub ↗

* Finds the label that is the target for a `continue` statement. * * @param labelText An optional name of a containing labeled statement.

(labelText)

Source from the content-addressed store, hash-verified

103741 * @param labelText An optional name of a containing labeled statement.
103742 */
103743 function findContinueTarget(labelText) {
103744 if (blockStack) {
103745 if (labelText) {
103746 for (var i = blockStack.length - 1; i >= 0; i--) {
103747 var block = blockStack[i];
103748 if (supportsUnlabeledContinue(block) && hasImmediateContainingLabeledBlock(labelText, i - 1)) {
103749 return block.continueLabel;
103750 }
103751 }
103752 }
103753 else {
103754 for (var i = blockStack.length - 1; i >= 0; i--) {
103755 var block = blockStack[i];
103756 if (supportsUnlabeledContinue(block)) {
103757 return block.continueLabel;
103758 }
103759 }
103760 }
103761 }
103762 return 0;
103763 }
103764 /**
103765 * Creates an expression that can be used to indicate the value for a label.
103766 *

Callers 2

visitContinueStatementFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…