public void visitContinueStatement(ContinueStatement statement) { String label = statement.getLabel(); boolean hasNamedLabel = label != null; if (!hasNamedLabel && !inLoop) { addError("the continue statement is only allowed inside loops", statement); } if (label != null) { boolean found = false; for (String element : visitedLabels) { if (element.equals(label)) { found = true; break; } } if (!found) continueLabels.add(statement); } super.visitContinueStatement(statement); }
public void visitStatement(Statement statement) { List<String> labels = statement.getStatementLabels(); if (labels != null) { for (String label : labels) { if (breakLabels != null) { for (Iterator<BreakStatement> iter = breakLabels.iterator(); iter.hasNext(); ) { if (iter.next().getLabel().equals(label)) iter.remove(); } } if (continueLabels != null) { for (Iterator<ContinueStatement> iter = continueLabels.iterator(); iter.hasNext(); ) { if (iter.next().getLabel().equals(label)) iter.remove(); } } if (visitedLabels != null) { visitedLabels.add(label); } } } super.visitStatement(statement); }
public void writeContinue(ContinueStatement statement) { controller.getAcg().onLineNumber(statement, "visitContinueStatement"); writeStatementLabel(statement); String name = statement.getLabel(); Label continueLabel = controller.getCompileStack().getContinueLabel(); if (name != null) continueLabel = controller.getCompileStack().getNamedContinueLabel(name); controller.getCompileStack().applyFinallyBlocks(continueLabel, false); controller.getMethodVisitor().visitJumpInsn(GOTO, continueLabel); }
public void visitStatement(Statement statement) { String label = statement.getStatementLabel(); if (label!=null) { for (Iterator iter = breakLabels.iterator(); iter.hasNext();) { BreakStatement element = (BreakStatement) iter.next(); if (element.getLabel().equals(label)) iter.remove(); } for (Iterator iter = continueLabels.iterator(); iter.hasNext();) { ContinueStatement element = (ContinueStatement) iter.next(); if (element.getLabel().equals(label)) iter.remove(); } visitedLabels.add(label); } super.visitStatement(statement); }
public void visitStatement(Statement statement) { String label = statement.getStatementLabel(); if (label!=null) { for (Iterator iter = breakLabels.iterator(); iter.hasNext();) { BreakStatement element = (BreakStatement) iter.next(); if (element.getLabel().equals(label)) iter.remove(); } for (Iterator iter = continueLabels.iterator(); iter.hasNext();) { ContinueStatement element = (ContinueStatement) iter.next(); if (element.getLabel().equals(label)) iter.remove(); } visitedLabels.add(label); } super.visitStatement(statement); }
public void visitStatement(Statement statement) { String label = statement.getStatementLabel(); if (label!=null) { for (Iterator iter = breakLabels.iterator(); iter.hasNext();) { BreakStatement element = (BreakStatement) iter.next(); if (element.getLabel().equals(label)) iter.remove(); } for (Iterator iter = continueLabels.iterator(); iter.hasNext();) { ContinueStatement element = (ContinueStatement) iter.next(); if (element.getLabel().equals(label)) iter.remove(); } visitedLabels.add(label); } super.visitStatement(statement); }
public void visitStatement(Statement statement) { String label = statement.getStatementLabel(); if (label!=null) { for (Iterator iter = breakLabels.iterator(); iter.hasNext();) { BreakStatement element = (BreakStatement) iter.next(); if (element.getLabel().equals(label)) iter.remove(); } for (Iterator iter = continueLabels.iterator(); iter.hasNext();) { ContinueStatement element = (ContinueStatement) iter.next(); if (element.getLabel().equals(label)) iter.remove(); } visitedLabels.add(label); } super.visitStatement(statement); }
public void visitContinueStatement(ContinueStatement statement) { String label = statement.getLabel(); boolean hasNamedLabel = label!=null; if (!hasNamedLabel && !inLoop) { addError("the continue statement is only allowed inside loops",statement); } if (label!=null) { boolean found=false; for (Iterator iter = visitedLabels.iterator(); iter.hasNext();) { String element = (String) iter.next(); if (element.equals(label)) { found = true; break; } } if (!found) continueLabels.add(statement); } super.visitContinueStatement(statement); }
public void visitContinueStatement(ContinueStatement statement) { String label = statement.getLabel(); boolean hasNamedLabel = label!=null; if (!hasNamedLabel && !inLoop) { addError("the continue statement is only allowed inside loops",statement); } if (label!=null) { boolean found=false; for (Iterator iter = visitedLabels.iterator(); iter.hasNext();) { String element = (String) iter.next(); if (element.equals(label)) { found = true; break; } } if (!found) continueLabels.add(statement); } super.visitContinueStatement(statement); }
public void visitContinueStatement(ContinueStatement statement) { String label = statement.getLabel(); boolean hasNamedLabel = label!=null; if (!hasNamedLabel && !inLoop) { addError("the continue statement is only allowed inside loops",statement); } if (label!=null) { boolean found=false; for (Iterator iter = visitedLabels.iterator(); iter.hasNext();) { String element = (String) iter.next(); if (element.equals(label)) { found = true; break; } } if (!found) continueLabels.add(statement); } super.visitContinueStatement(statement); }
public void visitContinueStatement(ContinueStatement statement) { String label = statement.getLabel(); boolean hasNamedLabel = label!=null; if (!hasNamedLabel && !inLoop) { addError("the continue statement is only allowed inside loops",statement); } if (label!=null) { boolean found=false; for (Iterator iter = visitedLabels.iterator(); iter.hasNext();) { String element = (String) iter.next(); if (element.equals(label)) { found = true; break; } } if (!found) continueLabels.add(statement); } super.visitContinueStatement(statement); }
@Override public void visitContinueStatement(ContinueStatement statement) { makeNode("continue_", new ConstantExpression(statement.getLabel())); }
public void visitContinueStatement(ContinueStatement statement) { onLineNumber(statement, "visitContinueStatement"); visitStatement(statement); String name = statement.getLabel(); Label continueLabel = compileStack.getContinueLabel(); if (name != null) continueLabel = compileStack.getNamedContinueLabel(name); compileStack.applyFinallyBlocks(continueLabel, false); mv.visitJumpInsn(GOTO, continueLabel); }
public void visitContinueStatement(ContinueStatement statement) { onLineNumber(statement, "visitContinueStatement"); visitStatement(statement); String name = statement.getLabel(); Label continueLabel = compileStack.getContinueLabel(); if (name != null) continueLabel = compileStack.getNamedContinueLabel(name); compileStack.applyFinallyBlocks(continueLabel, false); mv.visitJumpInsn(GOTO, continueLabel); }
public void visitContinueStatement(ContinueStatement statement) { onLineNumber(statement, "visitContinueStatement"); visitStatement(statement); String name = statement.getLabel(); Label continueLabel = compileStack.getContinueLabel(); if (name != null) continueLabel = compileStack.getNamedContinueLabel(name); compileStack.applyFinallyBlocks(continueLabel, false); mv.visitJumpInsn(GOTO, continueLabel); }
public void writeContinue(ContinueStatement statement) { controller.getAcg().onLineNumber(statement, "visitContinueStatement"); writeStatementLabel(statement); String name = statement.getLabel(); Label continueLabel = controller.getCompileStack().getContinueLabel(); if (name != null) continueLabel = controller.getCompileStack().getNamedContinueLabel(name); controller.getCompileStack().applyFinallyBlocks(continueLabel, false); controller.getMethodVisitor().visitJumpInsn(GOTO, continueLabel); }