In fact I did it because this is irregular in the sense that binary selector
should not printed with # while the keywords based symbol should.
(RBScanner on: '(RBScanner on: 'Object < #MyObject
classVariables: { #A. #B };
package: #MyPackage' readStream)
Hi sven
I think that I will have to hack my own, I was just surprised that we do not
have a nice way back
from tokens back to code. (not talking about quote inside strings).
String streamContents: [ :s |
#('self' 'classVariables:' ${ #A $. #B $})
do:
#foo printString.
'#foo'
String streamContents: [ :out | out print: #foo ].
'#foo'
String streamContents: [ :out | out << #foo ].
'foo'
I would not use #storeOn: directly, I would consider the fact that
String>>#printOn: uses it an implementation detail, and a confusing one at that.
> On
> On Jan 19, 2020, at 1:50 PM, Stéphane Ducasse
> wrote:
>
>
> The idea that is that I would like to be able to
>
> text -> tokens -> text
>
> For text -> tokens
>
> (RBScanner on: 'self classVariables: { #A . #B }' readStream)
> contents collect: #value
>
>
> I
The idea that is that I would like to be able to
text -> tokens -> text
For text -> tokens
(RBScanner on: 'self classVariables: { #A . #B }' readStream)
contents collect: #value
I wrote a little method that takes the result of the RBScanner and recreate the
text
But