diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2015-09-09 15:02:17 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2015-09-09 15:06:19 +1000 |
commit | e3f025c1e4fbef83528ab189b37e13ebdf1b9a72 (patch) | |
tree | ec8a296d23b49e1b6156f29f48b78d837a9e0162 /src/repl/scala/tools/nsc/interpreter/IMain.scala | |
parent | 1c42e6bee90b7c444e973726e01b137584dfaad5 (diff) | |
download | scala-e3f025c1e4fbef83528ab189b37e13ebdf1b9a72.tar.gz scala-e3f025c1e4fbef83528ab189b37e13ebdf1b9a72.tar.bz2 scala-e3f025c1e4fbef83528ab189b37e13ebdf1b9a72.zip |
Fix completion for multi-line entries
We need to include the previously entered lines into the code
that we presentation compile.
Management of this state makes the interpret method non tail
recursive, so we could blow the default stack with a multi-line entry
of hundreds of lines. I think thats an acceptable limitation.
Diffstat (limited to 'src/repl/scala/tools/nsc/interpreter/IMain.scala')
-rw-r--r-- | src/repl/scala/tools/nsc/interpreter/IMain.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/repl/scala/tools/nsc/interpreter/IMain.scala b/src/repl/scala/tools/nsc/interpreter/IMain.scala index 2085fd4e50..f6f391600b 100644 --- a/src/repl/scala/tools/nsc/interpreter/IMain.scala +++ b/src/repl/scala/tools/nsc/interpreter/IMain.scala @@ -80,6 +80,7 @@ class IMain(@BeanProperty val factory: ScriptEngineFactory, initialSettings: Set private var _isInitialized: Future[Boolean] = null // set up initialization future private var bindExceptions = true // whether to bind the lastException variable private var _executionWrapper = "" // code to be wrapped around all lines + var partialInput: String = "" // code accumulated in multi-line REPL input /** We're going to go to some trouble to initialize the compiler asynchronously. * It's critical that nothing call into it until it's been initialized or we will |