private static void delete(@NotNull PsiElement first, PsiElement last) {
    if (last == first) {
      first.delete();
    }
    else {
      first.getParent().deleteChildRange(first, last);
    }
  }
private static void delete(@NotNull PsiElement first, PsiElement last)