MCPcopy Create free account
hub / github.com/dynjs/dynjs / doWhileStatement

Method doWhileStatement

src/main/java/org/dynjs/parser/js/Parser.java:1605–1623  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1603 }
1604
1605 public DoWhileStatement doWhileStatement() {
1606 try {
1607 pushContext(ContextType.ITERATION);
1608 Token position = consume(DO);
1609 Statement body = statement();
1610 consume(WHILE);
1611 consume(LEFT_PAREN);
1612 Expression expr = expression();
1613 consume(RIGHT_PAREN);
1614
1615 // don't call semic() here because the semicolon is optional
1616 if (la() == SEMICOLON) {
1617 consume(SEMICOLON);
1618 }
1619 return factory.doWhileStatement(position, body, expr);
1620 } finally {
1621 popContext();
1622 }
1623 }
1624
1625 public WhileStatement whileStatement() {
1626 Token position = consume(WHILE);

Callers 1

iterationStatementMethod · 0.95

Calls 6

pushContextMethod · 0.95
consumeMethod · 0.95
statementMethod · 0.95
expressionMethod · 0.95
laMethod · 0.95
popContextMethod · 0.95

Tested by

no test coverage detected