aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-07-20 10:22:52 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-08-19 15:37:31 +0200
commit3efdb93cb760cc243e6eddcf041286de7f04195e (patch)
treee545c7d23349cff76efb0531871e217d2c647d81
parent354a67c964b344602148178bb567123badcc3b2b (diff)
downloaddotty-3efdb93cb760cc243e6eddcf041286de7f04195e.tar.gz
dotty-3efdb93cb760cc243e6eddcf041286de7f04195e.tar.bz2
dotty-3efdb93cb760cc243e6eddcf041286de7f04195e.zip
Add support for rendering tuples idiomatically
-rw-r--r--dottydoc/jvm/src/dotty/tools/dottydoc/model/json.scala2
-rw-r--r--dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/comment/BodyEntities.scala1
2 files changed, 3 insertions, 0 deletions
diff --git a/dottydoc/jvm/src/dotty/tools/dottydoc/model/json.scala b/dottydoc/jvm/src/dotty/tools/dottydoc/model/json.scala
index 3618d325f..44129e9d8 100644
--- a/dottydoc/jvm/src/dotty/tools/dottydoc/model/json.scala
+++ b/dottydoc/jvm/src/dotty/tools/dottydoc/model/json.scala
@@ -54,6 +54,8 @@ object json {
s"""{"title":${ref.title.json},"kind": "ConstantReference"}"""
case ref: FunctionReference =>
s"""{"args":${ref.args.map(refToJson).mkString("[",",","]")},"returnValue":${refToJson(ref.returnValue)},"kind": "FunctionReference"}"""
+ case ref: TupleReference =>
+ s"""{"args":${ref.args.map(refToJson).mkString("[",",","]")},"kind": "TupleReference"}"""
}
implicit class ReferenceJson(val ref: Reference) extends AnyVal { def json: String = refToJson(ref) }
diff --git a/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/comment/BodyEntities.scala b/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/comment/BodyEntities.scala
index ef8343d77..08da81059 100644
--- a/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/comment/BodyEntities.scala
+++ b/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/comment/BodyEntities.scala
@@ -104,6 +104,7 @@ final case class TypeReference(title: String, tpeLink: MaterializableLink, param
final case class OrTypeReference(left: Reference, right: Reference) extends Reference
final case class AndTypeReference(left: Reference, right: Reference) extends Reference
final case class FunctionReference(args: List[Reference], returnValue: Reference) extends Reference
+final case class TupleReference(args: List[Reference]) extends Reference
final case class BoundsReference(low: Reference, high: Reference) extends Reference
final case class NamedReference(title: String, ref: Reference, isByName: Boolean = false, isRepeated: Boolean = false) extends Reference
final case class ConstantReference(title: String) extends Reference