Thanks for discussing this issue. This is really interesting! Alexandre
On Nov 13, 2013, at 12:02 PM, Camille Teruel <[email protected]> wrote: > > On 13 nov. 2013, at 15:18, Andrei Chis <[email protected]> wrote: > >> >> >> >> YourClass methods do: [ :method | >> method ast >> forAllNodes: [ :node | node isVariable and: [ node isInstance ] >> ] >> putAfter: [ RFMetalink expression: 'Transcript crShow: ''iv >> accessed''' ]; >> installWrapper ]. >> >> >> >> I tried this code but it fails in the latest version of Reflectivity :) > > Neither in old ones, my mistake :) > >> First "RFMetalink class(Object)>>doesNotUnderstand: #expression:" > > Yes it's #fromExpression: > >> then "A variable node on left side of assignment doesn''t accept metalinks" > > Indeed > For iv assignment, you should put metalinks on the assignment node. > So it should be something like that: > > YourClass methods do: [ :method | > method ast > forAllNodes: [ :node | node isVariable and: [node isRead and: [ > node isInstance ] ] ] > putAfter: [ RFMetalink fromExpression: 'Transcript crShow: ''iv > read''' ]; > forAllNodes: [ :node | node isAssignment and: [ node variable > isInstance ] ] > putAfter: [ RFMetalink fromExpression: 'Transcript crShow: ''iv > written''' ]; > installWrapper ] > > >> >>> >>> Alexandre >>> -- >>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >>> Alexandre Bergel http://www.bergel.eu >>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >>> >>> >>> >>> >> >> > -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
