2012-07-31 22:03:36 +02:00
|
|
|
module Mutant
|
|
|
|
class Mutator
|
2012-08-01 14:13:57 +02:00
|
|
|
# Mutator that does do not mutations on ast
|
2012-08-09 23:07:22 +02:00
|
|
|
class Noop < self
|
2012-07-31 22:03:36 +02:00
|
|
|
|
2012-08-01 14:13:57 +02:00
|
|
|
# Literal references to self do not need to be mutated.
|
2012-07-31 22:03:36 +02:00
|
|
|
handle(Rubinius::AST::Self)
|
2012-08-20 17:53:41 +02:00
|
|
|
handle(Rubinius::AST::NilLiteral)
|
|
|
|
handle(Rubinius::AST::Return)
|
|
|
|
handle(Rubinius::AST::ElementAssignment)
|
|
|
|
handle(Rubinius::AST::AttributeAssignment)
|
|
|
|
handle(Rubinius::AST::Not)
|
|
|
|
handle(Rubinius::AST::LocalVariableAssignment)
|
|
|
|
handle(Rubinius::AST::LocalVariableAccess)
|
|
|
|
handle(Rubinius::AST::InstanceVariableAssignment)
|
|
|
|
handle(Rubinius::AST::InstanceVariableAccess)
|
|
|
|
handle(Rubinius::AST::GlobalVariableAssignment)
|
|
|
|
handle(Rubinius::AST::GlobalVariableAccess)
|
|
|
|
handle(Rubinius::AST::Ensure)
|
|
|
|
handle(Rubinius::AST::Rescue)
|
|
|
|
handle(Rubinius::AST::DynamicString)
|
|
|
|
handle(Rubinius::AST::DynamicSymbol)
|
|
|
|
handle(Rubinius::AST::DynamicRegex)
|
2012-07-31 22:03:36 +02:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
# Emit mutations
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def dispatch
|
|
|
|
# noop
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|