class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler

def within_loop

have `def in_sequence_head; :raise; end`
NOTE: assumes `@cur_index != :seq_head`. Node types using `within_loop` must
def within_loop
  sync do |sync_code|
    @cur_index = :variadic_mode
    "#{sync_code} && #{yield}"
  end || yield
end