diff options
author | Martin Odersky <odersky@gmail.com> | 2013-08-17 10:19:43 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-08-17 10:19:43 +0200 |
commit | fd6a6774be4be37f707f509aef997e456a6b64ac (patch) | |
tree | 50eea18194ce6a7b588b200a34150b8d75e64f0f /src/dotty/tools/dotc/printing/Printers.scala | |
parent | 0575d51b898d14f818e35a19a5f9f67f280a0b04 (diff) | |
download | dotty-fd6a6774be4be37f707f509aef997e456a6b64ac.tar.gz dotty-fd6a6774be4be37f707f509aef997e456a6b64ac.tar.bz2 dotty-fd6a6774be4be37f707f509aef997e456a6b64ac.zip |
Defined root context with imports
… and cleaned up and simplified other context-reated features.
Diffstat (limited to 'src/dotty/tools/dotc/printing/Printers.scala')
-rw-r--r-- | src/dotty/tools/dotc/printing/Printers.scala | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/printing/Printers.scala b/src/dotty/tools/dotc/printing/Printers.scala index ba1cf83bb..7107ccb78 100644 --- a/src/dotty/tools/dotc/printing/Printers.scala +++ b/src/dotty/tools/dotc/printing/Printers.scala @@ -5,11 +5,10 @@ import core.Contexts.Context trait Printers { this: Context => - /** A creation method for printers, depending on debug option */ - def printerFn = if (this.debug) plainPrinter else refinedPrinter - - /** A function creatung a printer */ - def printer = printerFn(this) - + /** A function creating a printer */ + def printer = { + val pr = printerFn(this) + if (this.debug) pr.plain else pr + } } |