From 953466de7c48dacde62c3c5e03d1f79dce547a7e Mon Sep 17 00:00:00 2001 From: Lex Spoon Date: Fri, 19 May 2006 13:12:40 +0000 Subject: added compileSources() --- src/compiler/scala/tools/nsc/Interpreter.scala | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/compiler/scala/tools/nsc/Interpreter.scala b/src/compiler/scala/tools/nsc/Interpreter.scala index 64945ce5f2..b05222e577 100644 --- a/src/compiler/scala/tools/nsc/Interpreter.scala +++ b/src/compiler/scala/tools/nsc/Interpreter.scala @@ -183,15 +183,20 @@ class Interpreter(val settings: Settings, reporter: Reporter, out: PrintWriter) cr.compileSources(List(new SourceFile(PlainFile.fromFile(jfile)))) } - /** Compile a string. Returns true if there are no - * compilation errors, or false otherwise. */ - def compileString(code: String): Boolean = { + /** Compile an nsc SourceFile. Returns true if there are + * no compilation errors, or false othrewise. */ + def compileSources(sources: List[SourceFile]): Boolean = { val cr = new compiler.Run reporter.reset - cr.compileSources(List(new SourceFile("