class RuboCop::Cop::InternalAffairs::NodePatternGroups::ASTProcessor

AST Processor for NodePattern ASTs, for use with ‘InternalAffairs/NodePatternGroups`.

Looks for sequences and subsequences where the first item is a ‘node_type` node, and converts them to `node_sequence` nodes (not a true `Rubocop::AST::NodePattern` node type).

The resulting AST will be walked by ‘InternalAffairs::NodePatternGroups::ASTWalker` in order to find node types in a `union` node that can be rewritten as a node group.

NOTE: The ‘on_*` methods in this class relate not to the normal node types but rather to the Node Pattern node types. Not every node type is handled.