--- a/PositionableStream.st Wed Dec 13 20:09:58 2000 +0100
+++ b/PositionableStream.st Wed Dec 13 20:12:37 2000 +0100
@@ -408,6 +408,22 @@
(in theory) create readers for any syntax.
"
+ ^ self fileInNextChunkNotifying:someone passChunk:passChunk silent:nil
+!
+
+fileInNextChunkNotifying:someone passChunk:passChunk silent:beSilent
+ "read next chunk, evaluate it and return the result;
+ someone (which is usually some codeView) is notified of errors.
+ Filein is done as follows:
+ read a chunk
+ if it started with an excla, evaluate it, and let the resulting object
+ fileIn more chunks.
+ This is a nice trick, since the methodsFor: expression evaluates to
+ a ClassCategoryReader which reads and compiles chunks for its class.
+ However, other than methodsFor expressions are possible - you can
+ (in theory) create readers for any syntax.
+ "
+
|aString sawExcla rslt done|
self skipSeparators.
@@ -452,7 +468,12 @@
done := (aString size == 0).
]
] ifFalse:[
- rslt := rslt fileInFrom:self notifying:someone passChunk:passChunk
+ rslt := rslt
+ fileInFrom:self
+ notifying:someone
+ passChunk:passChunk
+ single:false
+ silent:beSilent
]
]
]
@@ -1026,6 +1047,6 @@
!PositionableStream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/PositionableStream.st,v 1.96 2000-12-01 15:43:49 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/PositionableStream.st,v 1.97 2000-12-13 19:12:37 cg Exp $'
! !
PositionableStream initialize!