To make a parse table shallow, we must know which ids to keep.
split(cumsum(pd_parent_first$parent < 1))
above puts comments with negative
parents in the same block as proceeding expressions. find_pos_id_to_keep()
must hence always keep comments. We did not use
split(cumsum(pd_parent_first$parent < 1))
because then every comment is an
expression on its own and processing takes much longer for typical roxygen
annotated code
find_pos_id_to_keep(pd)
A temporary top level nest where the first expression is always a top level expression, potentially cached.