diff options
author | Martin Odersky <odersky@gmail.com> | 2016-02-13 22:35:57 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-02-17 18:38:52 +0100 |
commit | 6ecdc8a69db1a808269b1c288284a4a430ce865e (patch) | |
tree | c641eac92c93ca5d59f1c9c531633ae7eaffc72e /src/dotty/tools/dotc/repl/NewLinePrintWriter.scala | |
parent | 5f5eca9ee9367c57da8138f2618759dfc86ffb71 (diff) | |
download | dotty-6ecdc8a69db1a808269b1c288284a4a430ce865e.tar.gz dotty-6ecdc8a69db1a808269b1c288284a4a430ce865e.tar.bz2 dotty-6ecdc8a69db1a808269b1c288284a4a430ce865e.zip |
First PoC of REPL
Adaptation of REPL by Spoon from ca 2007. Compiles OK, but
not yet tested.
Diffstat (limited to 'src/dotty/tools/dotc/repl/NewLinePrintWriter.scala')
-rw-r--r-- | src/dotty/tools/dotc/repl/NewLinePrintWriter.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/repl/NewLinePrintWriter.scala b/src/dotty/tools/dotc/repl/NewLinePrintWriter.scala new file mode 100644 index 000000000..8e36a0ae4 --- /dev/null +++ b/src/dotty/tools/dotc/repl/NewLinePrintWriter.scala @@ -0,0 +1,11 @@ +package dotty.tools +package dotc +package repl +import java.io.{Writer, PrintWriter} + +class NewLinePrintWriter(out: Writer, autoFlush: Boolean) +extends PrintWriter(out, autoFlush) { + def this(out: Writer) = this(out, false) + override def println(): Unit = { print("\n"); flush() } +} + |