public static @Nullable PsiElement prevCodeLeaf(@NotNull PsiElement element) {
    PsiElement prevLeaf = prevLeaf(element, true);
    while (prevLeaf != null && isNonCodeLeaf(prevLeaf)) prevLeaf = prevLeaf(prevLeaf, true);
    return prevLeaf;
  }
public static @Nullable PsiElement prevCodeLeaf(@NotNull PsiElement element)