File tree Expand file tree Collapse file tree 3 files changed +19
-9
lines changed
src/dotty/tools/dotc/repl Expand file tree Collapse file tree 3 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ unset verbose quiet cygwin toolcp colors saved_stty CDPATH
38
38
39
39
CompilerMain=dotty.tools.dotc.Main
40
40
FromTasty=dotty.tools.dotc.FromTasty
41
- ReplMain=test.DottyRepl
41
+ ReplMain=dotty.tools.dotc.repl.Main
42
42
43
43
44
44
Original file line number Diff line number Diff line change @@ -8,24 +8,19 @@ trait InteractiveReader {
8
8
val interactive : Boolean
9
9
}
10
10
11
- /** TODO Enable jline support.
12
- * The current Scala REPL know how to do this flexibly.
11
+ /** The current Scala REPL know how to do this flexibly.
13
12
*/
14
13
object InteractiveReader {
15
14
/** Create an interactive reader. Uses JLine if the
16
15
* library is available, but otherwise uses a
17
16
* SimpleReader. */
18
- def createDefault (): InteractiveReader = new SimpleReader ()
19
- /*
20
- {
17
+ def createDefault (): InteractiveReader = {
21
18
try {
22
- new JLineReader
19
+ new JLineReader ()
23
20
} catch {
24
21
case e =>
25
22
// out.println("jline is not available: " + e) //debug
26
23
new SimpleReader ()
27
24
}
28
25
}
29
- */
30
-
31
26
}
Original file line number Diff line number Diff line change
1
+ package dotty .tools
2
+ package dotc
3
+ package repl
4
+
5
+ import jline .console .ConsoleReader
6
+
7
+ /** Adaptor for JLine
8
+ */
9
+ class JLineReader extends InteractiveReader {
10
+ val reader = new ConsoleReader ()
11
+
12
+ val interactive = true
13
+
14
+ def readLine (prompt : String ) = reader.readLine(prompt)
15
+ }
You can’t perform that action at this time.
0 commit comments