예제 #1
0
 @Override
 public void parse(MethodVisitorProxy mv, int local, VariableManager vm) {
   for (LoopFunction block : blocks) {
     block.restore(mv, vm);
   }
   mv.visitJumpInsn(GOTO, lblContinue);
 }
예제 #2
0
 @Override
 public void analyzeContent(Analyzer analyzer, TemplateReader reader) {
   blocks = new LoopFunction[nLoop - 1];
   LoopFunction now = (LoopFunction) find(getParent(), LoopFunction.class);
   int i = 1;
   while (true) {
     if (now == null) {
       reader.addMessage(
           String.format(
                   MessageFormat.MUST_BE_USED_INSIDE_OF,
                   "\"continue\"",
                   nLoop == 1 ? "a" : "the " + nLoop + "th")
               + " loop");
       return;
     }
     if (i == nLoop) {
       break;
     }
     blocks[i - 1] = now;
     now = (LoopFunction) find(now.getParent(), LoopFunction.class);
     i++;
   }
   lblContinue = ((LoopFunction) now).getContinueLabel();
 }