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

def compile_matched(kind)

Assumes `@cur_index` is already updated
def compile_matched(kind)
  to = compile_cur_index
  from = if @prev_index == :variadic_mode
           @prev_index_used = true
           @prev_index_var
         else
           compile_index(@prev_index)
         end
  case kind
  when :range
    "#{from}...#{to}"
  when :length
    "#{to} - #{from}"
  end
end