> > Say you want to write out a Date creation expression, then the following > (what you do) would not work: > > Compiler evaluate: (String streamContents: [ :out | > out << 'Date fromString: '. > Date today printOn: out ]). > > But the following does (as I did): > > Compiler evaluate: (String streamContents: [ :out | > out << 'Date fromString: '. > out print: Date today printString ]). > > You need to take the printed representation and turn it into a Smalltalk > String literal. If you just put it there, all the characters will be there > but the string will not be quoted, nor will embedded quotes be escaped > properly.
Yes I thought about it. I was thinking that we are pretty low-level for template programming. May be RBrewritter is the way to go.