public static @Unmodifiable @NotNull List<PsiElement> getElementsOfRange(@NotNull PsiElement start, @NotNull PsiElement end) {
    List<PsiElement> result = new ArrayList<>();
    for (PsiElement e = start; e != end; e = e.getNextSibling()) {
      if (e == null) throw new IllegalArgumentException("Invalid range: " + start + ".." + end);
      result.add(e);
    }
    result.add(end);
    return result;
  }
public static @Unmodifiable @NotNull List<PsiElement> getElementsOfRange(@NotNull PsiElement start, @NotNull PsiElement end)