diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2017-01-21 19:56:10 +0100 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2017-01-31 14:32:40 +0100 |
commit | 3e9451d79b3e6845c4b1c0906401108a609eddf8 (patch) | |
tree | 66a01844ca1043f5dc5b16ea0c8d7da93d70479f /doc-tool/src/dotty/tools/dottydoc/model/entities.scala | |
parent | 384f5a0dba5c2102327015c67781462ba475e43a (diff) | |
download | dotty-3e9451d79b3e6845c4b1c0906401108a609eddf8.tar.gz dotty-3e9451d79b3e6845c4b1c0906401108a609eddf8.tar.bz2 dotty-3e9451d79b3e6845c4b1c0906401108a609eddf8.zip |
Fix insertion of package nodes in doc AST
Diffstat (limited to 'doc-tool/src/dotty/tools/dottydoc/model/entities.scala')
-rw-r--r-- | doc-tool/src/dotty/tools/dottydoc/model/entities.scala | 9 |
1 files changed, 9 insertions, 0 deletions
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 { |