public static boolean isLeafElementOfType(PsiElement element, @NotNull TokenSet tokenSet) {
    return element instanceof LeafElement && tokenSet.contains(((LeafElement)element).getElementType());
  }
public static boolean isLeafElementOfType(PsiElement element, @NotNull TokenSet tokenSet)