boolean (@NotNull PsiElement matchedNode, int start, int end, @NotNull MatchContext context) { final List<MatchResult> results = matcher.matchByDownUp(matchedNode); for (MatchResult result : results) { if (PsiTreeUtil.isAncestor(result.getMatch(), matchedNode, false)) { return true; } } return false; }