free_mutant/lib/mutant/ast/meta/const.rb
John Backus 7931a01476 Add mutation Date.parse -> other parse methods
- Adds receiver specific selector mutations
- Closes #432
2015-10-09 10:58:31 -07:00

24 lines
499 B
Ruby

module Mutant
module AST
# Node meta information mixin
module Meta
# Metadata for const nodes
class Const
include NamedChildren, Concord.new(:node), NodePredicates
children :base, :name
# Test if AST node is possibly a top level constant
#
# @return [Boolean]
#
# @api private
def possible_top_level?
base.nil? || n_cbase?(base)
end
end # Const
end # Meta
end # AST
end # Mutant