PsiMatcher (PsiMatcherExpression e) { final PsiElement[] children = myElement.getChildren(); for (PsiElement child : children) { myElement = child; final Boolean res = e == null ? Boolean.TRUE : e.match(myElement); if (res == Boolean.TRUE) { return this; } else if (res == Boolean.FALSE) { final PsiMatcher grandChild = descendant(e); if (grandChild != NullPsiMatcherImpl.INSTANCE) return grandChild; } } return NullPsiMatcherImpl.INSTANCE; }