class RuboCop::NodePattern::Compiler
def compile_capt_ellip(tokens, cur_node, terms, index)
def compile_capt_ellip(tokens, cur_node, terms, index) capture = next_capture if (term = compile_seq_tail(tokens, "#{cur_node}.children.last")) terms << "(#{cur_node}.children.size > #{index})" terms << term terms << "(#{capture} = #{cur_node}.children[#{index}..-2])" else terms << "(#{cur_node}.children.size >= #{index})" if index > 0 terms << "(#{capture} = #{cur_node}.children[#{index}..-1])" end terms end