src/main/range-util.js/dropRootParents
function dropRootParents(parents) {
  let lastParentIndex = parents.length - 1;
  for (;;) {
    const parent = parents[lastParentIndex];
    if (parent && (parent.type === "Program" || parent.type === "File")) {
      lastParentIndex--;
    } else {
      break;
    }
  }
  return parents.slice(0, lastParentIndex + 1);
}