--- a/ClassCategoryReader.st Fri Oct 28 02:19:37 1994 +0100
+++ b/ClassCategoryReader.st Fri Oct 28 02:19:53 1994 +0100
@@ -1,6 +1,6 @@
"
COPYRIGHT (c) 1989 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -11,7 +11,7 @@
"
Object subclass:#ClassCategoryReader
- instanceVariableNames:'myClass myCategory myPrivacy ignore'
+ instanceVariableNames:'myClass myCategory privacy ignore'
classVariableNames:''
poolDictionaries:''
category:'Kernel-Support'
@@ -19,9 +19,9 @@
ClassCategoryReader comment:'
COPYRIGHT (c) 1989 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.10 1994-08-22 12:29:25 claus Exp $
+$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.11 1994-10-28 01:19:53 claus Exp $
'!
!ClassCategoryReader class methodsFor:'documentation'!
@@ -29,7 +29,7 @@
copyright
"
COPYRIGHT (c) 1989 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.10 1994-08-22 12:29:25 claus Exp $
+$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.11 1994-10-28 01:19:53 claus Exp $
"
!
@@ -61,6 +61,12 @@
methodCategory aCategory"
^ self new class:aClass category:aCategory
+!
+
+skippingChunks
+ "return a class categoryReader which skips chunks up to the next empty one"
+
+ ^ self new ignoreMethods
! !
!ClassCategoryReader methodsFor:'private'!
@@ -70,14 +76,18 @@
myClass := aClass.
myCategory := aCategory.
- myPrivacy := false.
+ privacy := nil.
ignore := false
! !
!ClassCategoryReader methodsFor:'special'!
privateProtocol
- myPrivacy := true
+ privacy := #private
+!
+
+protectedProtocol
+ privacy := #protected
!
ignoreMethods
@@ -95,24 +105,30 @@
done := false.
[done] whileFalse:[
- done := aStream atEnd.
- done ifFalse:[
- aString := aStream nextChunk.
- done := aString isNil or:[aString isEmpty].
- done ifFalse:[
- ignore ifFalse:[
- method := myClass compiler compile:aString
- forClass:myClass
- inCategory:myCategory
- notifying:requestor
- install:true
- skipIfSame:true.
- myPrivacy ifTrue:[
- method private:true
- ]
- ]
- ]
- ]
+ done := aStream atEnd.
+ done ifFalse:[
+ aString := aStream nextChunk.
+ done := aString isNil or:[aString isEmpty].
+ done ifFalse:[
+ ignore ifFalse:[
+ method := myClass compiler compile:aString
+ forClass:myClass
+ inCategory:myCategory
+ notifying:requestor
+ install:true
+ skipIfSame:true.
+ privacy notNil ifTrue:[
+ privacy == #private ifTrue:[
+ method setToPrivate
+ ] ifFalse:[
+ privacy == #protected ifTrue:[
+ method setToProtected
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
]
!