���
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 I cannot get this method to work.
I���m puzzled because the symbols are eaten.
expressionStringFrom: aLine
"self new
expressionStringFrom: #('self' 'classVariables:' ${ #A $. #B $})
>>>
'self classVariables: { A . B }'
"
^ String streamContents: [ :s |
aLine
do: [ :each | s << each ]
separatedBy: [ s space ]]
I tried with print:, printOn:, but I failed.
Any idea?