2013-07-28 19:03:06 -04:00
|
|
|
# encoding: utf-8
|
|
|
|
|
2013-06-14 14:19:53 -04:00
|
|
|
module Mutant
|
|
|
|
class Mutator
|
|
|
|
class Node
|
2013-06-15 11:13:01 -04:00
|
|
|
# Mutator for multiple assignment left hand side nodes
|
2013-06-14 14:19:53 -04:00
|
|
|
class MLHS < self
|
|
|
|
|
|
|
|
handle(:mlhs)
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
# Emit mutations
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def dispatch
|
|
|
|
children.each_index do |index|
|
|
|
|
mutate_child(index)
|
2013-12-07 13:03:17 -05:00
|
|
|
delete_child(index) unless children.one?
|
2013-06-14 14:19:53 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end # MLHS
|
|
|
|
end # Node
|
|
|
|
end # Mutator
|
|
|
|
end # Mutant
|