[Pharo-dev] problem while parsing xml
Sven Van Caekenberghe
sven at stfx.eu
Fri Dec 27 10:52:50 EST 2013
It seems logical that a CharacterSet contains Characters even if its internal implementation uses a bitmap, its API should - I would expect.
If nextChar is an Integer in the first code piece, maybe you are reading from a binary stream instead of from a character stream ?
On 27 Dec 2013, at 16:34, Stéphane Ducasse <stephane.ducasse at inria.fr> wrote:
> I’m trying to understand asciiValue
> | nextChar |
> [(nextChar := self peek) not Nil
> and: [SeparatorCharacters includes: nextChar]]
> whileTrue: [self next].
> SeparatorCharacters is a CharacterSet
> nextChar is an integer
> CharacterSet>>includes: aCharacter
> aCharacter asciiValue >= 256
> ifTrue: [^ false].
> ^ (map at aCharacter asciiValue + 1) >0
> but I’m stuck.
More information about the Pharo-dev