Hi Sean, 2017-06-04 5:48 GMT+02:00 Sean P. DeNigris <sean@clipperadams.com>:
I'm trying to write a rewrite rule, but can't quite get it.
I first want to remove `spec blessing: #baseline.`
I tried the following with no effect:
RBParseTreeRewriter new replace: '`@expr blessing: `#lit' with: ''; executeTree: methodTree; tree.
This works for me, but ...
NB: If I try to edit the expression instead of remove, by passing something like '`@expr assert: `#lit' for #with:, it works
What am I missing here?
Thanks!
keep in mind some odds about the caching on ast nodes. Working with the tree rewriter directly on the method ast (MyClass>>#myMethod) ast - will modify the "cached" method ast, that means, on code browser, you do not see the change. - the #source method of the ast, again only shows a cached source (MyClass>>#myMethod) ast source -> "old source" - printing the formatted code will finally step into the (modified) method source nodes (MyClass>>#myMethod) ast formattedCode -> "new source code"
----- Cheers, Sean -- View this message in context: http://forum.world.st/ Creating-a-BaselineOf-from-a-ConfigurationOf-baselineXyz-tp4949192.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.