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?
|
|
|
|
handle(Rubinius::AST::Self)
|
|
|
|
|
|
|
|
# Currently unhandled node classes. Feel free to contribute your mutator!
|
|
|
|
handle(Rubinius::AST::ElementAssignment)
|
|
|
|
handle(Rubinius::AST::AttributeAssignment)
|
|
|
|
handle(Rubinius::AST::Not)
|
|
|
|
handle(Rubinius::AST::And)
|
2013-01-01 15:41:39 -05:00
|
|
|
handle(Rubinius::AST::Or)
|
2012-12-06 15:30:28 -05:00
|
|
|
handle(Rubinius::AST::Defined)
|
|
|
|
handle(Rubinius::AST::Super)
|
2012-12-10 18:26:58 -05:00
|
|
|
handle(Rubinius::AST::Next)
|
2012-12-10 18:38:44 -05:00
|
|
|
handle(Rubinius::AST::Break)
|
2012-12-06 15:30:28 -05:00
|
|
|
handle(Rubinius::AST::Match3)
|
|
|
|
handle(Rubinius::AST::ZSuper)
|
|
|
|
handle(Rubinius::AST::MultipleAssignment)
|
|
|
|
handle(Rubinius::AST::ScopedConstant)
|
|
|
|
handle(Rubinius::AST::LocalVariableAccess)
|
|
|
|
handle(Rubinius::AST::InstanceVariableAccess)
|
|
|
|
handle(Rubinius::AST::GlobalVariableAccess)
|
2013-01-01 13:50:36 -05:00
|
|
|
handle(Rubinius::AST::ClassVariableAccess)
|
2012-12-06 16:36:14 -05:00
|
|
|
handle(Rubinius::AST::ToplevelConstant)
|
2012-12-06 15:30:28 -05:00
|
|
|
handle(Rubinius::AST::Ensure)
|
|
|
|
handle(Rubinius::AST::Rescue)
|
|
|
|
handle(Rubinius::AST::DynamicString)
|
|
|
|
handle(Rubinius::AST::DynamicSymbol)
|
|
|
|
handle(Rubinius::AST::DynamicRegex)
|
2013-01-01 15:41:39 -05:00
|
|
|
handle(Rubinius::AST::File)
|
2012-12-06 15:30:28 -05:00
|
|
|
handle(Rubinius::AST::OpAssignOr19)
|
2012-12-10 18:17:19 -05:00
|
|
|
handle(Rubinius::AST::BlockPass19)
|
2012-12-06 15:30:28 -05:00
|
|
|
handle(Rubinius::AST::OpAssign1)
|
2013-01-03 17:55:20 -05:00
|
|
|
handle(Rubinius::AST::OpAssign2)
|
2013-01-03 17:57:18 -05:00
|
|
|
handle(Rubinius::AST::SplatValue)
|
2012-12-06 15:30:28 -05:00
|
|
|
handle(Rubinius::AST::ConstantAccess)
|
2012-12-07 21:11:26 -05:00
|
|
|
handle(Rubinius::AST::Yield)
|
2013-01-01 19:04:16 -05:00
|
|
|
handle(Rubinius::AST::Begin)
|
|
|
|
handle(Rubinius::AST::Rescue)
|
2012-12-06 15:30:28 -05:00
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
# Emit mutations
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def dispatch
|
|
|
|
# noop
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|