ASTNode (int role) { LOG.assertTrue(ChildRole.isUnique(role)); switch(role) { case ChildRole.LOOP_BODY: return PsiImplUtil.findStatementChild(this); case ChildRole.FOR_ITERATED_VALUE: return findChildByType(EXPRESSION_BIT_SET); case ChildRole.FOR_KEYWORD: return getFirstChildNode(); case ChildRole.LPARENTH: return findChildByType(LPARENTH); case ChildRole.RPARENTH: return findChildByType(RPARENTH); case ChildRole.COLON: return findChildByType(COLON); case ChildRole.FOR_ITERATION_PARAMETER: return findChildByType(PARAMETER); default: return null; } }