yarhrn / new-scaladoc

3 stars 1 forks source link

make model closer to scalameta ast & create model for generics #16

Closed yaroslavhq closed 9 years ago

yaroslavhq commented 9 years ago

fixes #3
fixes #6

yaroslavhq commented 9 years ago

New class Name is an unique identifier for DocElement. Elements those are could be documented should implement trait DocElement. Rest model members should extend trait Tree. Unresolved questions: How should default value be implemented? (there is default: Option[Term] filed in original scalameta tree, but in doc we don't need all staff connected with Term) Should we have file:SourceFile member in Defn? Should we have parent reference in tree trait?{trait tree {def parent : Tree }} Also, (maybe in scope of Index) we should be able to map Type.Name => Name => DocElement, for supporting links,etc.

cvogt commented 9 years ago

@kolowheel For all the things you are not sure about if we need them? Leave them out for now, we can add them when we need them. Not sure what you mean by map Type.Name => Name => DocElement

Can you explain more?

cvogt commented 9 years ago

do we still need DocElement? Can't we use something from the meta trees instead? E.g. Tree or Symbol or something?

cvogt commented 9 years ago

@kolowheel heading the right way. Can we still move ClassDoc, TraitDoc into the meta structure? Probably means adding Template. Or anything that prevents it?