13cd04d9be
* Add Mutant::AST namespace to hold all AST related data / helpers. * Mutant::AST will be externalized into an ast-meta gem that can be shared with unparser for deduplication. * Over the time the mutators itself will not need to deal with semantic analysis of the AST anymore by themselves. * Move AST analysis for send nodes to AST::Meta * Fix #209
21 lines
661 B
Ruby
21 lines
661 B
Ruby
module Mutant
|
|
module AST
|
|
# Singleton nodes
|
|
module Nodes
|
|
extend Sexp
|
|
|
|
N_NAN = s(:send, s(:float, 0.0), :/, s(:float, 0.0))
|
|
N_INFINITY = s(:send, s(:float, 1.0), :/, s(:float, 0.0))
|
|
N_NEGATIVE_INFINITY = s(:send, s(:float, -1.0), :/, s(:float, 0.0))
|
|
N_RAISE = s(:send, nil, :raise)
|
|
N_TRUE = s(:true)
|
|
N_FALSE = s(:false)
|
|
N_NIL = s(:nil)
|
|
N_EMPTY = s(:empty)
|
|
N_SELF = s(:self)
|
|
N_ZSUPER = s(:zsuper)
|
|
N_EMPTY_SUPER = s(:super)
|
|
|
|
end # Node
|
|
end # AST
|
|
end # Mutant
|