summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-03-13 12:11:57 +0000
committerpaltherr <paltherr@epfl.ch>2003-03-13 12:11:57 +0000
commit2301c181a8fc73353cb6dea995caadb0db790079 (patch)
tree113405ac6e9a5386e009f5f92383c388069ba244 /sources
parente9314e43583b257afe4cdc45557e721c60052ea2 (diff)
downloadscala-2301c181a8fc73353cb6dea995caadb0db790079.tar.gz
scala-2301c181a8fc73353cb6dea995caadb0db790079.tar.bz2
scala-2301c181a8fc73353cb6dea995caadb0db790079.zip
- Adapted to the new module schema
Diffstat (limited to 'sources')
-rw-r--r--sources/scala/tools/scalai/Interpreter.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/sources/scala/tools/scalai/Interpreter.java b/sources/scala/tools/scalai/Interpreter.java
index 98b5241622..53a36980ab 100644
--- a/sources/scala/tools/scalai/Interpreter.java
+++ b/sources/scala/tools/scalai/Interpreter.java
@@ -114,7 +114,7 @@ public class Interpreter {
if (program.length > 0) load(lfiles = program);
if (global.reporter.errors() == 0 && main != null) call(main, args);
// Compute something to start compiler and force loading of Predef
- if (interactive && program.length == 0 && main == null) eval("null");
+ // !!! if (interactive && program.length == 0 && main == null) eval("null");
if (interactive) while (handle(read()));
global.stop("total");
if (!interactive) global.reporter.printSummary();
@@ -223,7 +223,7 @@ public class Interpreter {
public boolean eval(String input) {
if (input.trim().length() == 0) return true;
- global.compile(input, true);
+ global.compile(input + ";", true);
return interpret(true);
}
@@ -262,12 +262,12 @@ public class Interpreter {
}
public void show(EvaluatorResult result, boolean interactive) {
+ // !!! remove case Value from EvaluatorResult
switch (result) {
case Void:
return;
case Value(Object value):
- // !!! if (value != null)
- if (interactive && value != null) writer.println(value);
+ // !!! if (interactive && value != null) writer.println(value);
return;
case Error(EvaluatorException exception):
writer.println(exception.mkString(global));