From 3e9451d79b3e6845c4b1c0906401108a609eddf8 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Sat, 21 Jan 2017 19:56:10 +0100 Subject: Fix insertion of package nodes in doc AST --- doc-tool/src/dotty/tools/dottydoc/model/entities.scala | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'doc-tool/src/dotty/tools/dottydoc/model/entities.scala') diff --git a/doc-tool/src/dotty/tools/dottydoc/model/entities.scala b/doc-tool/src/dotty/tools/dottydoc/model/entities.scala index 7027a72eb..9cbd1f6c8 100644 --- a/doc-tool/src/dotty/tools/dottydoc/model/entities.scala +++ b/doc-tool/src/dotty/tools/dottydoc/model/entities.scala @@ -21,6 +21,13 @@ trait Entity { entity => def annotations: List[String] + def signature: String = + entity.name + (entity match { + case o: Object => "$" + case d: Def => d.paramLists.mkString + case _ => "" + }) + def children: List[Entity with Members] = entity match { case e: Entity with Members => e.members.collect { case e: Entity with Members if e.kind != "package" => e } @@ -74,6 +81,8 @@ trait ReturnValue { trait ParamList { def list: List[NamedReference] def isImplicit: Boolean + + override def toString = list.map(_.title).mkString("(", ",", ")") } trait Constructors { -- cgit v1.2.3