2012-12-06 15:30:28 -05:00
|
|
|
module Mutant
|
|
|
|
class Mutator
|
|
|
|
class Node
|
|
|
|
# Mutator that does not do mutations on ast
|
|
|
|
class Noop < self
|
|
|
|
|
|
|
|
# Literal references to self do not need to be mutated?
|
2013-06-21 12:10:06 -04:00
|
|
|
handle(:self)
|
|
|
|
|
|
|
|
# These nodes still need a mutator, your contribution is that close!
|
2013-06-04 04:25:13 -04:00
|
|
|
handle(
|
2013-06-21 12:10:06 -04:00
|
|
|
:zsuper, :not, :or, :and, :defined,
|
|
|
|
:next, :break, :match, :gvar, :cvar, :ensure,
|
|
|
|
:dstr, :dsym, :yield, :rescue, :redo, :defined?,
|
|
|
|
:lvar, :splat, :const, :blockarg, :block_pass, :op_asgn, :regopt,
|
|
|
|
:ivar, :restarg, :casgn, :masgn, :resbody, :retry, :arg_expr,
|
|
|
|
:kwrestarg, :kwoptarg, :kwarg, :undef, :module, :cbase, :empty,
|
|
|
|
:alias, :for, :xstr, :back_ref, :nth_ref, :class, :sclass, :match_with_lvasgn,
|
2013-06-28 18:32:20 -04:00
|
|
|
:match_current_line, :or_asgn, :kwbegin
|
2013-06-04 04:25:13 -04:00
|
|
|
)
|
2013-04-17 23:31:21 -04:00
|
|
|
|
2012-12-06 15:30:28 -05:00
|
|
|
private
|
|
|
|
|
|
|
|
# Emit mutations
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def dispatch
|
|
|
|
end
|
2013-06-04 17:44:32 -04:00
|
|
|
|
2013-06-14 14:54:02 -04:00
|
|
|
end # Noop
|
2013-06-04 17:44:32 -04:00
|
|
|
end # Node
|
|
|
|
end # Mutator
|
|
|
|
end # Mutant
|