aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/repl/NewLinePrintWriter.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-02-13 22:35:57 +0100
committerMartin Odersky <odersky@gmail.com>2016-02-17 18:38:52 +0100
commit6ecdc8a69db1a808269b1c288284a4a430ce865e (patch)
treec641eac92c93ca5d59f1c9c531633ae7eaffc72e /src/dotty/tools/dotc/repl/NewLinePrintWriter.scala
parent5f5eca9ee9367c57da8138f2618759dfc86ffb71 (diff)
downloaddotty-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.scala11
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() }
+}
+