Self (final @NotNull ElementPattern skip, final @NotNull ElementPattern pattern) { return with(new PatternCondition<T>("withLastChildSkipping") { @Override public boolean accepts(@NotNull T t, ProcessingContext context) { PsiElement last = t.getLastChild(); while (last != null && skip.accepts(last)) { last = last.getPrevSibling(); } return pattern.accepts(last); } }); }