scala-dev icon indicating copy to clipboard operation
scala-dev copied to clipboard

Remove DocDef from AST

Open retronym opened this issue 9 years ago • 4 comments
trafficstars

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

retronym avatar Aug 11 '16 00:08 retronym

Spawned from discussion in https://github.com/scala/scala/pull/5304#discussion_r74346584

retronym avatar Aug 11 '16 00:08 retronym

It'll be great to clean this up, but let's be clear that this is not a priority right now.

adriaanm avatar Aug 11 '16 00:08 adriaanm

One last passing comment: we could do this for Annotated as well.

retronym avatar Aug 11 '16 01:08 retronym

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.

jodersky avatar Aug 11 '16 15:08 jodersky