* Makes a code path segment for the body part of a WhileStatement. * @returns {void}
()
| 1983 | * @returns {void} |
| 1984 | */ |
| 1985 | makeWhileBody() { |
| 1986 | const context = this.loopContext; |
| 1987 | const choiceContext = this.choiceContext; |
| 1988 | const forkContext = this.forkContext; |
| 1989 | |
| 1990 | if (!choiceContext.processed) { |
| 1991 | choiceContext.trueForkContext.add(forkContext.head); |
| 1992 | choiceContext.falseForkContext.add(forkContext.head); |
| 1993 | } |
| 1994 | |
| 1995 | /* |
| 1996 | * If this isn't a hardcoded `true` condition, then `break` |
| 1997 | * should continue down the path as if the condition evaluated |
| 1998 | * to false. |
| 1999 | */ |
| 2000 | if (context.test !== true) { |
| 2001 | context.brokenForkContext.addAll(choiceContext.falseForkContext); |
| 2002 | } |
| 2003 | forkContext.replaceHead(choiceContext.trueForkContext.makeNext(0, -1)); |
| 2004 | } |
| 2005 | |
| 2006 | /** |
| 2007 | * Makes a code path segment for the body part of a DoWhileStatement. |
no test coverage detected