boolean (@NotNull PsiElement element) { PsiElement child = element.getFirstChild(); while (child != null) { if (child instanceof CompositeElement) { return containsOuterLanguageElements(child); } if (child instanceof OuterLanguageElement) { return true; } child = child.getNextSibling(); } return false; }