diff options
Diffstat (limited to 'src/repl/scala/tools/nsc/interpreter/LoopCommands.scala')
-rw-r--r-- | src/repl/scala/tools/nsc/interpreter/LoopCommands.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/repl/scala/tools/nsc/interpreter/LoopCommands.scala b/src/repl/scala/tools/nsc/interpreter/LoopCommands.scala index 12d6ee5112..f177816b30 100644 --- a/src/repl/scala/tools/nsc/interpreter/LoopCommands.scala +++ b/src/repl/scala/tools/nsc/interpreter/LoopCommands.scala @@ -76,6 +76,9 @@ trait LoopCommands { // the default result means "keep running, and don't record that line" val default = Result(keepRunning = true, None) + // "keep running, and record this line" + def recording(line: String) = Result(keepRunning = true, Option(line)) + // most commands do not want to micromanage the Result, but they might want // to print something to the console, so we accomodate Unit and String returns. implicit def resultFromUnit(x: Unit): Result = default @@ -85,4 +88,3 @@ trait LoopCommands { } } } - |