something: aSomething
something := aSomething
[OUT]
something: aSomething
self write: aSomething into: #something
you should try {:node :dic | ... }
to handle that.
Something like:
RBParseTreeRewriter new
replace: '`@var `{:node :dic | dic at: #varName put: node name} := `@arg'
with: 'self write: `@arg into: `{:dic |
RBParser parseExpression: ''#'', (dic at: #varName) }'.