private static @Nullable ASTNode findLastLeaf(ASTNode first, ASTNode last) {
    do {
      ASTNode leaf = TreeUtil.findLastLeaf(last);
      if (leaf != null) return leaf;
      last = last.getTreePrev();
      if (last == null) return null;
    }
    while (first != last);
    return null;
  }
private static @Nullable ASTNode findLastLeaf(ASTNode first, ASTNode last)