()
| 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); |
no test coverage detected