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

def visit_union

def visit_union
  return visit_other_type if node.arity == 1
  # The way we implement complex unions is by "forking", i.e.
  # making a copy of the present subcompiler to compile each branch
  # of the union.
  # We then use the resulting state of the subcompilers to
  # reset ourselves.
  forks = compile_union_forks
  preserve_union_start(forks)
  merge_forks!(forks)
  expr = forks.values.join(" || \n")
  "(#{expr})"
end