aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/repl/InteractiveReader.scala
blob: 96c55ebd0c8c83d07cd9f1321977b4f1cda4d85b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package dotty.tools
package dotc
package repl

/** Reads lines from an input stream */
trait InteractiveReader {
  def readLine(prompt: String): String
  val interactive: Boolean
}

/** TODO Enable jline support.
 *  The current Scala REPL know how to do this flexibly.
 */
object InteractiveReader {
  /** Create an interactive reader.  Uses JLine if the
   *  library is available, but otherwise uses a
   *  SimpleReader. */
  def createDefault(): InteractiveReader = new SimpleReader()
  /*
  {
    try {
      new JLineReader
    } catch {
      case e =>
        //out.println("jline is not available: " + e) //debug
	      new SimpleReader()
    }
  }
*/

}