Thanks Thierry, I'll try it out! re werner: ... the other question was about the tool, because it was a very nice tool to write and tweak rewrite rules On Sat, Nov 11, 2017 at 7:32 PM, werner kassens <wkassens@libello.com> wrote:
Hi Peter, i assume from your question "RewriteTool maintained?" that you want to make a RBTransformationRule, right? if yes, i once had a similar problem and overwrote only #checkMethod: checkMethod: aMethod | arg | arg := aMethod argumentNames first asString. self initialize. self rewriteRule replace: '| ``@temporaries1 | `.@Statement' with: ('| ``@temporaries1 | {1} blahblah ifTrue: [ ^ {1} adaptToNumber: self andSend: #{2}]. `.@Statement' format: {arg. aMethod selector}). ^ super checkMethod: aMethod not too elegant, but it works. you could strip ":" from the method selector and do something similar. werner
On 11/11/2017 05:17 PM, Peter Uhnák wrote:
Hi,
how can I rewrite a(n instance) variable to a symbol?
E.g.
[IN] something: aSomething something := aSomething
[OUT] something: aSomething self write: aSomething into: #something
I can capute the input just fine... ``@var := ``@arg but I have no idea how to convert the var into a symbol (or string).
Thanks, Peter