aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/dotc/config/ScalaSettings.scala1
-rw-r--r--src/dotty/tools/dotc/printing/Printers.scala2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/config/ScalaSettings.scala b/src/dotty/tools/dotc/config/ScalaSettings.scala
index b925ffa5a..035b20130 100644
--- a/src/dotty/tools/dotc/config/ScalaSettings.scala
+++ b/src/dotty/tools/dotc/config/ScalaSettings.scala
@@ -151,6 +151,7 @@ class ScalaSettings extends Settings.SettingGroup {
val Yheartbeat = BooleanSetting("-Yheartbeat", "show heartbeat stack trace of compiler operations.")
val Yprintpos = BooleanSetting("-Yprintpos", "show tree positions.")
val YnoDeepSubtypes = BooleanSetting("-Yno-deep-subtypes", "throw an exception on deep subtyping call stacks.")
+ val YplainPrinter = BooleanSetting("-Yplain-printer", "Pretty-print using a plain printer.")
val YprintSyms = BooleanSetting("-Yprint-syms", "when printing trees print info in symbols instead of corresponding info in trees.")
val YtestPickler = BooleanSetting("-Ytest-pickler", "self-test for pickling functionality; should be used with -Ystop-after:pickler")
val YcheckReentrant = BooleanSetting("-Ycheck-reentrant", "check that compiled program does not contain vars that can be accessed from a global root.")
diff --git a/src/dotty/tools/dotc/printing/Printers.scala b/src/dotty/tools/dotc/printing/Printers.scala
index 7107ccb78..36043a4ff 100644
--- a/src/dotty/tools/dotc/printing/Printers.scala
+++ b/src/dotty/tools/dotc/printing/Printers.scala
@@ -8,7 +8,7 @@ trait Printers { this: Context =>
/** A function creating a printer */
def printer = {
val pr = printerFn(this)
- if (this.debug) pr.plain else pr
+ if (this.settings.YplainPrinter.value) pr.plain else pr
}
}