yarhrn / new-scaladoc

3 stars 1 forks source link

make model as close to meta as possible #6

Closed cvogt closed 9 years ago

cvogt commented 9 years ago

I would like to see this project help the efforts in scala meta and meta doc if in any way possible. One is to keep the trees as similar as possible, so that it is easy to take over code between the projects or interop as libraries.

It seems to me that the strategy should be that we replicate meta's trees in their current state, but add all doc relevant data that meta computes using a compiler as actual data into the model, e.g. super classes.

It sounds like metadoc is doing that (without having checked that). If that is the case, we can basically take a subset of metadoc's model as we go and eventually hopefully the full model and concentrate on the backends and improving metadocs model rather than newly inventing it from scratch.

So we should adapt the current model to metadoc's model (if it is true that it is designed as described above).

cvogt commented 9 years ago

Basically change names and structure of the case classes in https://github.com/kolowheel/new-scaladoc/blob/master/src/main/scala/newmodel/DocElement.scala to match this https://github.com/scalameta/scalameta/blob/master/scalameta/src/main/scala/scala/meta/Trees.scala