Hi everyone, I believe you should be able to do this transformation with Rewrite Tool. The only problem I see is that you want to do this only with single symbol. Because, in my tool you can do:
transform: *`#literal* into: *`#literal aMessage*. In this case `#literal means any literal, not only symbols. In other words it will transform $a into $a aMessage Also, this rule will transform, for instance 123 into 123 aMessage If I understand right, you would like to do this programatically, so you don't need RewriteTool in that case. Mark 2015-09-12 16:46 GMT+03:00 Peter Uhnák <[email protected]>: > If you don't want to manually operate on AST, you can use Mark's Rewrite > Tool ( http://screencast.com/t/LCEl0hFl , > https://medium.com/@peteruhnak/using-rewrite-tool-for-fixing-deprecated-code-12a595b291d8 > ) > > As for ASTs I would be also curious about the answer, as this seems like > it should be a simple task. > > Peter > > On Sat, Sep 12, 2015 at 2:24 PM, Julien Delplanque <[email protected]> > wrote: > >> Hi everyone, >> >> I would like to modify the AST of a smalltalk expression compiled to >> automatically send a certain message >> when a node represents a Character (so the user does not have to write >> the message sending explicitly). >> I would of course add a special button in the menu you get when right >> clicking in a playground so the user >> knows it is a "special" do-it... >> >> For example: >> $a. >> would transform into an ast that the source code looks like >> $a aMessage >> >> How can I do this? :) >> >> Julien >> >> >
