--- 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 $'
! !