aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/Compiler.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-09-16 11:49:41 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-10-10 13:25:33 +0200
commit12ac3054bf4288403babb172c125cdc98cfff012 (patch)
tree978ffdb3a6699edd6a47ca0f86a3055e8baa6d54 /src/dotty/tools/dotc/Compiler.scala
parentfb4f8ce66c406bfb6376396ea0521df063b883e9 (diff)
downloaddotty-12ac3054bf4288403babb172c125cdc98cfff012.tar.gz
dotty-12ac3054bf4288403babb172c125cdc98cfff012.tar.bz2
dotty-12ac3054bf4288403babb172c125cdc98cfff012.zip
Add ability to choose between fancy and non-fancy output
Diffstat (limited to 'src/dotty/tools/dotc/Compiler.scala')
-rw-r--r--src/dotty/tools/dotc/Compiler.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/Compiler.scala b/src/dotty/tools/dotc/Compiler.scala
index fb9ce83fc..d6e3cc89b 100644
--- a/src/dotty/tools/dotc/Compiler.scala
+++ b/src/dotty/tools/dotc/Compiler.scala
@@ -8,7 +8,7 @@ import Symbols._
import Types._
import Scopes._
import typer.{FrontEnd, Typer, ImportInfo, RefChecks}
-import reporting.{Reporter, FancyConsoleReporter}
+import reporting.{Reporter, ConsoleReporter, FancyConsoleReporter}
import Phases.Phase
import transform._
import transform.TreeTransforms.{TreeTransform, TreeTransformer}
@@ -140,6 +140,10 @@ class Compiler {
.setTyper(new Typer)
.setMode(Mode.ImplicitsEnabled)
.setTyperState(new MutableTyperState(ctx.typerState, ctx.typerState.reporter, isCommittable = true))
+ .setReporter(
+ if (ctx.settings.color.value == "never") new ConsoleReporter()
+ else new FancyConsoleReporter()
+ )
ctx.initialize()(start) // re-initialize the base context with start
def addImport(ctx: Context, refFn: () => TermRef) =
ctx.fresh.setImportInfo(ImportInfo.rootImport(refFn)(ctx))