aboutsummaryrefslogtreecommitdiff
path: root/dottydoc/jvm/test/BaseTest.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-06-28 18:04:31 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-08-19 15:37:28 +0200
commitc80af6a29b816d2ba7863b25b5c508efc4362b73 (patch)
treec489e58bed53f185703fdeb0c030383b2e4ebd00 /dottydoc/jvm/test/BaseTest.scala
parent81a86be75dd45f6e3eae4bb5fdd016058738c497 (diff)
downloaddotty-c80af6a29b816d2ba7863b25b5c508efc4362b73.tar.gz
dotty-c80af6a29b816d2ba7863b25b5c508efc4362b73.tar.bz2
dotty-c80af6a29b816d2ba7863b25b5c508efc4362b73.zip
Introduce DocMiniPhase concept, fused phases
Like dotty, dottydoc can now also enjoy the modularity of having fused mini-phases. By extending `DocMiniPhase` and overriding the appropriate methods, one can alter the DocAST easily. ping: @DarkDimius
Diffstat (limited to 'dottydoc/jvm/test/BaseTest.scala')
-rw-r--r--dottydoc/jvm/test/BaseTest.scala12
1 files changed, 6 insertions, 6 deletions
diff --git a/dottydoc/jvm/test/BaseTest.scala b/dottydoc/jvm/test/BaseTest.scala
index 1a2fb25cf..0c6fad1c8 100644
--- a/dottydoc/jvm/test/BaseTest.scala
+++ b/dottydoc/jvm/test/BaseTest.scala
@@ -6,7 +6,7 @@ import Contexts.{ Context, ContextBase, FreshContext }
import dotc.util.SourceFile
import dotc.core.Phases.Phase
import dotc.typer.FrontEnd
-import dottydoc.core.DocPhase
+import dottydoc.core.DocASTPhase
trait DottyTest {
dotty.tools.dotc.parsing.Scanners // initialize keywords
@@ -22,8 +22,8 @@ trait DottyTest {
ctx
}
- private def compilerWithChecker(assertion: DocPhase => Unit) = new DottyDocCompiler {
- private[this] val docPhase = new DocPhase
+ private def compilerWithChecker(assertion: DocASTPhase => Unit) = new DottyDocCompiler {
+ private[this] val docPhase = new DocASTPhase
override def phases =
List(new FrontEnd) ::
@@ -35,21 +35,21 @@ trait DottyTest {
Nil
}
- def checkSource(source: String)(assertion: DocPhase => Unit): Unit = {
+ def checkSource(source: String)(assertion: DocASTPhase => Unit): Unit = {
val c = compilerWithChecker(assertion)
c.rootContext(ctx)
val run = c.newRun
run.compile(source)
}
- def checkFiles(sources: List[String])(assertion: DocPhase => Unit): Unit = {
+ def checkFiles(sources: List[String])(assertion: DocASTPhase => Unit): Unit = {
val c = compilerWithChecker(assertion)
c.rootContext(ctx)
val run = c.newRun
run.compile(sources)
}
- def checkSources(sourceFiles: List[SourceFile])(assertion: DocPhase => Unit): Unit = {
+ def checkSources(sourceFiles: List[SourceFile])(assertion: DocASTPhase => Unit): Unit = {
val c = compilerWithChecker(assertion)
c.rootContext(ctx)
val run = c.newRun