MCPcopy Index your code
hub / github.com/BloombergGraphics/whatiscode / parseDoWhileStatement

Function parseDoWhileStatement

scripts/libs/esprima.js:3394–3419  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

3392 // 12.6 Iteration Statements
3393
3394 function parseDoWhileStatement(node) {
3395 var body, test, oldInIteration;
3396
3397 expectKeyword('do');
3398
3399 oldInIteration = state.inIteration;
3400 state.inIteration = true;
3401
3402 body = parseStatement();
3403
3404 state.inIteration = oldInIteration;
3405
3406 expectKeyword('while');
3407
3408 expect('(');
3409
3410 test = parseExpression();
3411
3412 expect(')');
3413
3414 if (match(';')) {
3415 lex();
3416 }
3417
3418 return node.finishDoWhileStatement(body, test);
3419 }
3420
3421 function parseWhileStatement(node) {
3422 var test, body, oldInIteration;

Callers 1

parseStatementFunction · 0.85

Calls 6

expectKeywordFunction · 0.85
parseStatementFunction · 0.85
expectFunction · 0.85
parseExpressionFunction · 0.85
matchFunction · 0.85
lexFunction · 0.85

Tested by

no test coverage detected