MCPcopy Create free account
hub / github.com/mozilla/rhino / whileLoop

Method whileLoop

rhino/src/main/java/org/mozilla/javascript/Parser.java:1696–1715  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1694 }
1695
1696 private WhileLoop whileLoop() throws IOException {
1697 if (currentToken != Token.WHILE) codeBug();
1698 consumeToken();
1699 int pos = ts.tokenBeg;
1700 WhileLoop pn = new WhileLoop(pos);
1701 pn.setLineColumnNumber(lineNumber(), columnNumber());
1702 enterLoop(pn);
1703 try {
1704 ConditionData data = condition();
1705 pn.setCondition(data.condition);
1706 pn.setParens(data.lp - pos, data.rp - pos);
1707 AstNode body = getNextStatementAfterInlineComments(pn);
1708 pn.setLength(getNodeEnd(body) - pos);
1709 restoreRelativeLoopPosition(pn);
1710 pn.setBody(body);
1711 } finally {
1712 exitLoop();
1713 }
1714 return pn;
1715 }
1716
1717 private DoLoop doLoop() throws IOException {
1718 if (currentToken != Token.DO) codeBug();

Callers 1

statementHelperMethod · 0.95

Calls 15

codeBugMethod · 0.95
consumeTokenMethod · 0.95
lineNumberMethod · 0.95
columnNumberMethod · 0.95
enterLoopMethod · 0.95
conditionMethod · 0.95
setConditionMethod · 0.95
getNodeEndMethod · 0.95
exitLoopMethod · 0.95
setLineColumnNumberMethod · 0.80

Tested by

no test coverage detected