MCPcopy
hub / github.com/eslint/eslint / makeWhileTest

Method makeWhileTest

lib/linter/code-path-analysis/code-path-state.js:1970–1979  ·  view source on GitHub ↗

* Makes a code path segment for the test part of a WhileStatement. * @param {boolean|undefined} test The test value (only when constant). * @returns {void}

(test)

Source from the content-addressed store, hash-verified

1968 * @returns {void}
1969 */
1970 makeWhileTest(test) {
1971 const context = this.loopContext;
1972 const forkContext = this.forkContext;
1973 const testSegments = forkContext.makeNext(0, -1);
1974
1975 // Update state.
1976 context.test = test;
1977 context.continueDestSegments = testSegments;
1978 forkContext.replaceHead(testSegments);
1979 }
1980
1981 /**
1982 * Makes a code path segment for the body part of a WhileStatement.

Callers 1

preprocessFunction · 0.80

Calls 2

makeNextMethod · 0.80
replaceHeadMethod · 0.80

Tested by

no test coverage detected