blob: 9387f366a25f8f7bed6622a08d23c164e9c724fd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package dotty.tools
package dotc
package repl
import java.io.Writer
/** A Writer that writes onto the Scala Console.
*
* @author Lex Spoon
* @version 1.0
*/
class ConsoleWriter extends Writer {
def close = flush
def flush = Console.flush
def write(cbuf: Array[Char], off: Int, len: Int): Unit =
if (len > 0)
write(new String(cbuf, off, len))
override def write(str: String): Unit = Console.print(str)
}
|