2012-12-06 15:30:28 -05:00
|
|
|
module Mutant
|
|
|
|
class Mutator
|
|
|
|
class Node
|
|
|
|
class Literal < self
|
|
|
|
# Mutator for symbol literals
|
|
|
|
class Symbol < self
|
|
|
|
|
2013-06-04 04:25:13 -04:00
|
|
|
handle(:sym)
|
2012-12-06 15:30:28 -05:00
|
|
|
|
2013-07-27 15:14:41 -04:00
|
|
|
PREFIX = 's'
|
|
|
|
|
2012-12-06 15:30:28 -05:00
|
|
|
private
|
|
|
|
|
|
|
|
# Emit mutatns
|
|
|
|
#
|
|
|
|
# @return [undefined]
|
|
|
|
#
|
|
|
|
# @api private
|
|
|
|
#
|
|
|
|
def dispatch
|
|
|
|
emit_nil
|
2013-07-27 15:14:41 -04:00
|
|
|
emit_new { new_self((PREFIX + Random.hex_string).to_sym) }
|
2012-12-06 15:30:28 -05:00
|
|
|
end
|
2013-06-04 04:25:13 -04:00
|
|
|
|
|
|
|
end # Symbol
|
|
|
|
end # Literal
|
|
|
|
end # Node
|
|
|
|
end # Mutator
|
|
|
|
end # Mutant
|