mutalk icon indicating copy to clipboard operation
mutalk copied to clipboard

nodeToMutate doesn't work with block based mutation

Open DurieuxPol opened this issue 1 year ago • 0 comments

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

DurieuxPol avatar Feb 09 '24 09:02 DurieuxPol