(Loop loop)
| 565 | } |
| 566 | |
| 567 | private void enterLoop(Loop loop) { |
| 568 | if (loopSet == null) loopSet = new ArrayList<>(); |
| 569 | loopSet.add(loop); |
| 570 | if (loopAndSwitchSet == null) loopAndSwitchSet = new ArrayList<>(); |
| 571 | loopAndSwitchSet.add(loop); |
| 572 | pushScope(loop); |
| 573 | if (currentLabel != null) { |
| 574 | currentLabel.setStatement(loop); |
| 575 | currentLabel.getFirstLabel().setLoop(loop); |
| 576 | // This is the only time during parsing that we set a node's parent |
| 577 | // before parsing the children. In order for the child node offsets |
| 578 | // to be correct, we adjust the loop's reported position back to an |
| 579 | // absolute source offset, and restore it when we call |
| 580 | // restoreRelativeLoopPosition() (invoked just before setBody() is |
| 581 | // called on the loop). |
| 582 | loop.setRelative(-currentLabel.getPosition()); |
| 583 | } |
| 584 | } |
| 585 | |
| 586 | private void exitLoop() { |
| 587 | loopSet.remove(loopSet.size() - 1); |
no test coverage detected