Module: Mutant::AST::Types Private

Included in:
Mutator::Node::Send
Defined in:
lib/mutant/ast/types.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Groups of node types

Constant Summary collapse

ASSIGNABLE_VARIABLES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Set.new(%i[ivasgn lvasgn cvasgn gvasgn]).freeze
OP_ASSIGN =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Set of op-assign types

Set.new(%i[or_asgn and_asgn op_asgn]).freeze
NOT_STANDALONE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Set of node types that are not valid when emitted standalone

Set.new(%i[splat restarg block_pass]).freeze
INDEX_OPERATORS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Set.new(%i[[] []=]).freeze
UNARY_METHOD_OPERATORS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Set.new(%i[~@ +@ -@ !]).freeze
METHOD_OPERATORS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Operators ruby implements as methods

Set.new(%i[
  !
  !=
  !~
  %
  &
  *
  **
  +
  +@
  -
  -@
  /
  <
  <<
  <=
  <=>
  ==
  ===
  =~
  >
  >=
  >>
  []
  []=
  ^
  |
  ~@
]).freeze
BINARY_METHOD_OPERATORS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Set.new(
  METHOD_OPERATORS - (INDEX_OPERATORS + UNARY_METHOD_OPERATORS)
)
BLACKLIST =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Nodes that are NOT handled by mutant.

not - 1.8 only, mutant does not support 1.8

Set.new(%i[not]).freeze
GENERATED =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Nodes that are NOT generated by parser but used by mutant / unparser.

Set.new(%i[empty]).freeze
ALL =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Set.new(
  (Parser::Meta::NODE_TYPES + GENERATED) - BLACKLIST
).freeze