The key challenge is Rd like \code{"{"} since the unmatched { is allowed because it's in a string inside a \code{} tag.
It might be possible to use parse_rd() for this, but need to carefully consider the consequences and what exactly a "fragment" of Rd can be.