int (@NotNull ASTNode child) { LOG.assertTrue(child.getTreeParent() == this); IElementType i = child.getElementType(); if (i == DO_KEYWORD) { return ChildRole.DO_KEYWORD; } else if (i == WHILE_KEYWORD) { return ChildRole.WHILE_KEYWORD; } else if (i == LPARENTH) { return ChildRole.LPARENTH; } else if (i == RPARENTH) { return ChildRole.RPARENTH; } else if (i == SEMICOLON) { return ChildRole.CLOSING_SEMICOLON; } else { if (EXPRESSION_BIT_SET.contains(child.getElementType())) { return ChildRole.CONDITION; } else if (child.getPsi() instanceof PsiStatement) { return ChildRole.LOOP_BODY; } else { return ChildRoleBase.NONE; } } }