class RuboCop::NodePattern::Compiler
def compile_seq(tokens, cur_node, seq_head)
def compile_seq(tokens, cur_node, seq_head) fail_due_to('empty parentheses') if tokens.first == ')' fail_due_to('parentheses at sequence head') if seq_head # 'cur_node' is a Ruby expression which evaluates to an AST node, # but we don't know how expensive it is # to be safe, cache the node in a temp variable and then use the # temp variable as 'cur_node' with_temp_node(cur_node) do |init, temp_node| terms = compile_seq_terms(tokens, temp_node) join_terms(init, terms, ' && ') end end