how to use the rewrite tools

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how to use the rewrite tools

Stéphane Ducasse
Hi

I wanted to use the rewritetools.
So I selected a package and refactoring scope
on the new browser I selected rewritetools

Since I want to replace self should: by self assert: I wrote something  
like that

ParseTreeRewriter new
        replace: 'self should: `@.statements' with: 'self assert:  
`@.statements'; yourself


Now how can I get the code run?

Stef

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: how to use the rewrite tools

Lukas Renggli
> Since I want to replace self should: by self assert: I wrote something
> like that
>
> ParseTreeRewriter new
>        replace: 'self should: `@.statements' with: 'self assert:
> `@.statements'; yourself
>
>
> Now how can I get the code run?

Accept (Apple+S)

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project