From: Jean Privat Date: Thu, 4 Dec 2014 03:29:15 +0000 (-0500) Subject: Merge: Fallback doc X-Git-Tag: v0.7~87 X-Git-Url: http://nitlanguage.org?hp=-c Merge: Fallback doc In order to fill the descriptions on the [overview page], add a way for a mproject or a mgroup to use the mdoc of other entities. [overview page]: http://nitlanguage.org/doc/stdlib/ Pull-Request: #954 Reviewed-by: Alexandre Terrasa --- 01b16b711ad46af4c548b4b7f08399700c42663a diff --combined src/doc/doc_model.nit index 4523ec3,a1233db..9794beb --- a/src/doc/doc_model.nit +++ b/src/doc/doc_model.nit @@@ -172,6 -172,7 +172,7 @@@ redef class MProjec redef fun tpl_definition do var tpl = new TplDefinition + var mdoc = mdoc_or_fallback if mdoc != null then tpl.comment = mdoc.tpl_comment end @@@ -213,6 -214,7 +214,7 @@@ redef class MGrou redef fun tpl_definition do var tpl = new TplDefinition + var mdoc = mdoc_or_fallback if mdoc != null then tpl.comment = mdoc.tpl_comment end @@@ -610,28 -612,6 +612,28 @@@ redef class MVirtualTypeDe end end +redef class MInnerClass + redef fun nitdoc_url do return inner.nitdoc_url + redef fun tpl_signature do return inner.tpl_signature +end + +redef class MInnerClassDef + redef fun nitdoc_url do return inner.nitdoc_url + + redef fun tpl_anchor do return inner.tpl_anchor + redef fun tpl_link do return inner.tpl_link + redef fun tpl_signature do return inner.tpl_signature + + redef fun tpl_definition do + var tpl = new TplClassDefinition + tpl.namespace = mclassdef.tpl_namespace + if mdoc != null then + tpl.comment = mdoc.tpl_comment + end + return tpl + end +end + redef class MType fun tpl_signature: Template is abstract end