aboutsummaryrefslogtreecommitdiff
path: root/doc-tool/src/dotty/tools/dottydoc/DocFrontEnd.scala
diff options
context:
space:
mode:
Diffstat (limited to 'doc-tool/src/dotty/tools/dottydoc/DocFrontEnd.scala')
-rw-r--r--doc-tool/src/dotty/tools/dottydoc/DocFrontEnd.scala17
1 files changed, 17 insertions, 0 deletions
diff --git a/doc-tool/src/dotty/tools/dottydoc/DocFrontEnd.scala b/doc-tool/src/dotty/tools/dottydoc/DocFrontEnd.scala
new file mode 100644
index 000000000..30c5e3e87
--- /dev/null
+++ b/doc-tool/src/dotty/tools/dottydoc/DocFrontEnd.scala
@@ -0,0 +1,17 @@
+package dotty.tools
+package dottydoc
+
+import dotc.typer.FrontEnd
+import dotc.core.Contexts.Context
+import dotc.CompilationUnit
+
+/** `DocFrontEnd` uses the Dotty `FrontEnd` without discarding the AnyVal
+ * interfaces for Boolean, Int, Char, Long, Byte etc.
+ *
+ * It currently still throws away Java sources by overriding
+ * `discardAfterTyper`.
+ */
+class DocFrontEnd extends FrontEnd {
+ override protected def discardAfterTyper(unit: CompilationUnit)(implicit ctx: Context) =
+ unit.isJava
+}