boolean (final PsiElement element, final PsiElement element2) { if (element == null && isLeftLooseMatching()) { return true; } if (element2 == null && isRightLooseMatching()) { return true; } if (element == null || element2 == null) { return element == element2; } return matchSequentiallyOptionally(element.getFirstChild(), element2.getFirstChild()); }