Hi,

I am trying to write a rewrite rule to replace something like:

browser showOn: #xxx; from: #yyy; using: [
        browser list ...
        browser tree ... ]

to something like:  

browser transmit to: #xxx; from: #yyy; andShow: [:a | 
        a list ...
        a tree ... ]


I managed to do the following:

RBParseTreeRewriter new
        replace: '`...@browser showOn: `...@target; from: `...@origin; using: [
                `[email protected] ]' with: '`...@browser transmit to: 
`...@target; from: `...@origin; andShow: [:a | `[email protected]]';
        yourself

However, the problem here is that I do not know how to replace all the 
"browser" appearances with "a" inside the andShow: block. I tried multiple 
variations like the one below, but I could not seem to get it to work as I want.

        replace: '`...@browser showOn: `...@target; from: `...@origin; using: [
                `...@browser `[email protected]]' with: '`...@browser transmit 
to: `...@target; from: `...@origin; andShow: [:a | a `[email protected]]';


Can anyone point me into the right direction?

Cheers,
Doru

--
www.tudorgirba.com

"What we can governs what we wish."




Reply via email to