int (final GrExpression arg) { int res = 0; for (PsiElement cur = getFirstChild(); cur != null; cur = cur.getNextSibling()) { if (cur instanceof GrExpression) { if (arg == cur) return res; res++; } } return -1; }