*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Thu, 07 Dec 2006 18:00:37 +0100
changeset 10252 c27816dc60c3
parent 10251 653b5d0a7713
child 10253 48588709c555
*** empty log message ***
ReadEvalPrintLoop.st
--- a/ReadEvalPrintLoop.st	Thu Dec 07 17:55:40 2006 +0100
+++ b/ReadEvalPrintLoop.st	Thu Dec 07 18:00:37 2006 +0100
@@ -76,11 +76,12 @@
      Otherwise, lines up to an empty line (or EOF) are read."
 
     [
-        |input output error lines chunk|
+        |input output error lines chunk compilerClass|
 
         input := inputStream ? Stdin.
         output := outputStream ? Stdout.
         error := errorStream ? Stderr.
+        compilerClass := compiler ? Compiler.
 
         prompt notNil ifTrue:[
             output nextPutAll:prompt.
@@ -115,17 +116,21 @@
             ] do:[
                 |value|
 
-                value := (compiler new requestor:self) evaluate:chunk.
+                value := (compilerClass new requestor:self) evaluate:chunk.
                 value printOn:output
             ].
         ].
     ] loop.
 
+    "
+     (ReadEvalPrintLoop new prompt:'>') readEvalPrintLoop
+    "
+
     "Created: / 07-12-2006 / 17:27:21 / cg"
 ! !
 
 !ReadEvalPrintLoop class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ReadEvalPrintLoop.st,v 1.2 2006-12-07 16:52:33 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ReadEvalPrintLoop.st,v 1.3 2006-12-07 17:00:37 cg Exp $'
 ! !