added header in file scala/tools/nsc/EvalLoop.scala

git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@6891 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
michelou 2006-03-24 11:06:56 +00:00
parent c0e2e8e836
commit 0abe09c709
1 changed files with 13 additions and 6 deletions

View File

@ -1,15 +1,22 @@
package scala.tools.nsc;
/* NSC -- new Scala compiler
* Copyright 2005-2006 LAMP/EPFL
* @author Martin Odersky
*/
// $Id$
package scala.tools.nsc
trait EvalLoop {
def prompt: String;
def prompt: String
def loop(action: (String) => Unit): Unit = {
Console.print(prompt);
val line = Console.readLine;
Console.print(prompt)
val line = Console.readLine
if (line != null && line.length() > 0) {
action(line);
loop(action);
action(line)
loop(action)
}
}
}