mutalk
mutalk copied to clipboard
nodeToMutate doesn't work with block based mutation
nodeToMutate
| n searcher |
n := 1.
searcher := RBParseTreeSearcher new
matches: operator expressionToReplace
do: [ :node :answer |
n = nodeNumber ifTrue: [ ^ node ].
n := n + 1 ];
yourself.
searcher executeTree: originalMethod ast.
self error: 'Not found'
It is expecting that expressionToReplace returns a string