@@ -72,7 +72,7 @@ class ReplDriver(settings: Array[String],
7272 }
7373
7474 /** the initial, empty state of the REPL session */
75- protected [ this ] def initState = State (0 , 0 , Nil , rootCtx)
75+ final def initialState = State (0 , 0 , Nil , rootCtx)
7676
7777 /** Reset state of repl to the initial state
7878 *
@@ -97,15 +97,15 @@ class ReplDriver(settings: Array[String],
9797 // is called, we're in business
9898 resetToInitial()
9999
100- final def runUntilQuit (): State = runUntilQuit(initState )
100+ final def runUntilQuit (): State = runUntilQuit(initialState )
101101
102102 /** Run REPL with `state` until `:quit` command found
103103 *
104104 * This method is the main entry point into the REPL. Its effects are not
105105 * observable outside of the CLI, for this reason, most helper methods are
106106 * `protected final` to facilitate testing.
107107 */
108- final def runUntilQuit (initialState : State ): State = {
108+ final def runUntilQuit (initialState : State = initialState ): State = {
109109 val terminal = new JLineTerminal ()
110110
111111 /** Blockingly read a line, getting back a parse result */
@@ -139,15 +139,9 @@ class ReplDriver(settings: Array[String],
139139 val parsed = ParseResult (input)(state.context)
140140 interpret(parsed)
141141 }
142-
143- final def bindValues (bindPairs : ZippedTraversable2 [String , Any ]): State = {
144- bindPairs.foldLeft(initState) {
145- case (state, (name, value)) => bind(name, value)(state)
146- }
147- }
148142
149143 // TODO: i3007
150- private def bind (name: String , value: Any )(implicit state : State ): State = state
144+ final def bind (name: String , value: Any )(implicit state : State ): State = state
151145
152146 private def withRedirectedOutput (op : => State ): State =
153147 Console .withOut(out) { Console .withErr(out) { op } }
@@ -321,7 +315,7 @@ class ReplDriver(settings: Array[String],
321315
322316 case Reset =>
323317 resetToInitial()
324- initState
318+ initialState
325319
326320 case Imports =>
327321 state.imports.foreach(i => out.println(SyntaxHighlighting (i.show(state.context))))
0 commit comments