/** * @see <a href="http://java.sun.com/docs/books/jls/third_edition/html/statements.html#14.14.2">JLS section 14.14.2</a> * @see <a href="http://bugs.sun.com/view_bug.do?bug_id=1699917">Bug 1699917</a> */ public Rule enhancedForStatement() { return Sequence( String("for"), group.basics.testLexBreak(), group.basics.optWS(), Ch('('), group.basics.optWS(), group.structures.variableDefinitionModifiers().label("modifiers"), group.types.type().label("type"), group.structures.variableDefinitionPartNoAssign().label("varDeclPart"), Ch(':'), group.basics.optWS(), group.expressions.anyExpression().label("iterable"), Ch(')'), group.basics.optWS(), anyStatement().label("statement"), set(actions.createEnhancedFor(node("modifiers"), value("type"), node("varDeclPart"), value("iterable"), value("statement")))); }
/** * @see <a href="http://java.sun.com/docs/books/jls/third_edition/html/statements.html#14.14.2">JLS section 14.14.2</a> * @see <a href="http://bugs.sun.com/view_bug.do?bug_id=1699917">Bug 1699917</a> */ public Rule enhancedForStatement() { return Sequence( String("for"), group.basics.testLexBreak(), group.basics.optWS(), Ch('('), group.basics.optWS(), group.structures.variableDefinitionModifiers().label("modifiers"), group.types.type().label("type"), group.structures.variableDefinitionPartNoAssign().label("varDeclPart"), Ch(':'), group.basics.optWS(), group.expressions.anyExpression().label("iterable"), Ch(')'), group.basics.optWS(), anyStatement().label("statement"), set(actions.createEnhancedFor(node("modifiers"), value("type"), node("varDeclPart"), value("iterable"), value("statement")))); }
/** * @see <a href="http://java.sun.com/docs/books/jls/third_edition/html/statements.html#14.14.2">JLS section 14.14.2</a> * @see <a href="http://bugs.sun.com/view_bug.do?bug_id=1699917">Bug 1699917</a> */ public Rule enhancedForStatement() { return Sequence( String("for"), group.basics.testLexBreak(), group.basics.optWS(), Ch('('), group.basics.optWS(), group.structures.variableDefinitionModifiers().label("modifiers"), group.types.type().label("type"), group.structures.variableDefinitionPartNoAssign().label("varDeclPart"), Ch(':'), group.basics.optWS(), group.expressions.anyExpression().label("iterable"), Ch(')'), group.basics.optWS(), anyStatement().label("statement"), set(actions.createEnhancedFor(node("modifiers"), value("type"), node("varDeclPart"), value("iterable"), value("statement")))); }