@@ -5,6 +5,7 @@ import java.nio.charset.StandardCharsets
5
5
6
6
import dotty .tools .dotc .ast .Trees ._
7
7
import dotty .tools .dotc .ast .{tpd , untpd }
8
+ import dotty .tools .dotc .config .Properties .{javaVersion , javaVmName , simpleVersionString }
8
9
import dotty .tools .dotc .core .Contexts ._
9
10
import dotty .tools .dotc .core .Phases .{unfusedPhases , typerPhase }
10
11
import dotty .tools .dotc .core .Denotations .Denotation
@@ -124,6 +125,10 @@ class ReplDriver(settings: Array[String],
124
125
final def runUntilQuit (initialState : State = initialState): State = {
125
126
val terminal = new JLineTerminal
126
127
128
+ out.println(
129
+ s """ Welcome to Scala $simpleVersionString ( $javaVersion, Java $javaVmName).
130
+ |Type in expressions for evaluation. Or try :help. """ .stripMargin)
131
+
127
132
/** Blockingly read a line, getting back a parse result */
128
133
def readLine (state : State ): ParseResult = {
129
134
val completer : Completer = { (_, line, candidates) =>
@@ -208,7 +213,7 @@ class ReplDriver(settings: Array[String],
208
213
}
209
214
210
215
private def interpret (res : ParseResult )(implicit state : State ): State = {
211
- val newState = res match {
216
+ res match {
212
217
case parsed : Parsed if parsed.trees.nonEmpty =>
213
218
compile(parsed, state)
214
219
@@ -225,11 +230,6 @@ class ReplDriver(settings: Array[String],
225
230
case _ => // new line, empty tree
226
231
state
227
232
}
228
- inContext(newState.context) {
229
- if (! ctx.settings.XreplDisableDisplay .value)
230
- out.println()
231
- newState
232
- }
233
233
}
234
234
235
235
/** Compile `parsed` trees and evolve `state` in accordance */
0 commit comments