aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dottydoc/js/src/html/EntityLayout.scala2
-rw-r--r--dottydoc/jvm/src/dotty/tools/dottydoc/DottyDoc.scala9
-rw-r--r--dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala6
-rw-r--r--src/dotty/tools/dotc/typer/FrontEnd.scala2
4 files changed, 15 insertions, 4 deletions
diff --git a/dottydoc/js/src/html/EntityLayout.scala b/dottydoc/js/src/html/EntityLayout.scala
index 3e4777714..37a72c73d 100644
--- a/dottydoc/js/src/html/EntityLayout.scala
+++ b/dottydoc/js/src/html/EntityLayout.scala
@@ -46,7 +46,7 @@ case class EntityLayout(entity: Entity) extends MemberLayout {
cls := "entity-super-types",
st.superTypes.collect {
case unset: UnsetLink => unset.title.asInstanceOf[Text].text
- }.mkString(" extends ", " with ", "")
+ }.mkString("extends ", " with ", "")
))
case _ => None
}
diff --git a/dottydoc/jvm/src/dotty/tools/dottydoc/DottyDoc.scala b/dottydoc/jvm/src/dotty/tools/dottydoc/DottyDoc.scala
index 1fb93d961..8b4dc5525 100644
--- a/dottydoc/jvm/src/dotty/tools/dottydoc/DottyDoc.scala
+++ b/dottydoc/jvm/src/dotty/tools/dottydoc/DottyDoc.scala
@@ -7,7 +7,7 @@ import dotc.config.Printers.dottydoc
import dotc.core.Contexts._
import dotc.core.Phases.Phase
import dotc.typer.FrontEnd
-import dotc.{Compiler, Driver, Run}
+import dotc.{ CompilationUnit, Compiler, Driver, Run }
import io.PlainFile
import scala.util.control.NonFatal
@@ -27,7 +27,7 @@ import scala.util.control.NonFatal
*/
class DottyDocCompiler extends Compiler {
override def phases: List[List[Phase]] =
- List(new FrontEnd) ::
+ List(new DocFrontEnd) ::
List(new DocPhase) ::
Nil
@@ -37,6 +37,11 @@ class DottyDocCompiler extends Compiler {
}
}
+class DocFrontEnd extends FrontEnd {
+ override protected def discardAfterTyper(unit: CompilationUnit)(implicit ctx: Context) =
+ unit.isJava
+}
+
class DocRun(comp: Compiler)(implicit ctx: Context) extends Run(comp)(ctx) {
def fromDirectory(f: String): List[String] = {
val file = new PlainFile(f)
diff --git a/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala b/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala
index ff4cc52fe..b95b0637c 100644
--- a/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala
+++ b/dottydoc/shared/src/main/scala/dotty/tools/dottydoc/model/factories.scala
@@ -109,6 +109,12 @@ object factories {
def filteredName(str: String) = str
.replaceAll("\\$colon", ":")
.replaceAll("\\$plus", "+")
+ .replaceAll("\\$minus", "-")
.replaceAll("\\$less", "<")
+ .replaceAll("\\$greater", ">")
.replaceAll("\\$eq", "=")
+ .replaceAll("\\$bang", "!")
+ .replaceAll("\\$amp", "&")
+ .replaceAll("\\$bar", "|")
+ .replaceAll("\\$up", "^")
}
diff --git a/src/dotty/tools/dotc/typer/FrontEnd.scala b/src/dotty/tools/dotc/typer/FrontEnd.scala
index c5c6aec3c..e193b126a 100644
--- a/src/dotty/tools/dotc/typer/FrontEnd.scala
+++ b/src/dotty/tools/dotc/typer/FrontEnd.scala
@@ -57,7 +57,7 @@ class FrontEnd extends Phase {
case _ => NoSymbol
}
- private def discardAfterTyper(unit: CompilationUnit)(implicit ctx: Context) =
+ protected def discardAfterTyper(unit: CompilationUnit)(implicit ctx: Context) =
unit.isJava || firstTopLevelDef(unit.tpdTree :: Nil).isPrimitiveValueClass
override def runOn(units: List[CompilationUnit])(implicit ctx: Context): List[CompilationUnit] = {