IElementTypePattern (final @NotNull TokenSet tokenSet) { return with(new PatternCondition<IElementType>("tokenSet") { @Override public boolean accepts(final @NotNull IElementType type, final ProcessingContext context) { return tokenSet.contains(type); } }); }