scala-dev
scala-dev copied to clipboard
Remove DocDef from AST
We have a long tail of bugs from places in the compiler that forget to unwrap them.
I propose to encoded them as tree attachments rather than a wrapper node.
Prototype:
https://github.com/scala/scala/compare/d59de7d571c503064d3d2ad0db3312b9e6793616...retronym:topic/elim-doc-def?expand=1
Spawned from discussion in https://github.com/scala/scala/pull/5304#discussion_r74346584
It'll be great to clean this up, but let's be clear that this is not a priority right now.
One last passing comment: we could do this for Annotated as well.
Could we apply something similar to scanners too? Your proposal, combined with scanners that always emit doc comments would make it easy to deduplicate quite some code from the Scaladoc frontend.