class Prism::DotVisitor

def visit_multi_write_node(node)

Visit a MultiWriteNode node.
def visit_multi_write_node(node)
  table = Table.new("MultiWriteNode")
  id = node_id(node)
  # lefts
  if node.lefts.any?
    table.field("lefts", port: true)
    waypoint = "#{id}_lefts"
    digraph.waypoint("#{waypoint};")
    digraph.edge("#{id}:lefts -> #{waypoint};")
    node.lefts.each { |child| digraph.edge("#{waypoint} -> #{node_id(child)};") }
  else
    table.field("lefts", "[]")
  end
  # rest
  unless (rest = node.rest).nil?
    table.field("rest", port: true)
    digraph.edge("#{id}:rest -> #{node_id(rest)};")
  end
  # rights
  if node.rights.any?
    table.field("rights", port: true)
    waypoint = "#{id}_rights"
    digraph.waypoint("#{waypoint};")
    digraph.edge("#{id}:rights -> #{waypoint};")
    node.rights.each { |child| digraph.edge("#{waypoint} -> #{node_id(child)};") }
  else
    table.field("rights", "[]")
  end
  # lparen_loc
  unless (lparen_loc = node.lparen_loc).nil?
    table.field("lparen_loc", location_inspect(lparen_loc))
  end
  # rparen_loc
  unless (rparen_loc = node.rparen_loc).nil?
    table.field("rparen_loc", location_inspect(rparen_loc))
  end
  # operator_loc
  table.field("operator_loc", location_inspect(node.operator_loc))
  # value
  table.field("value", port: true)
  digraph.edge("#{id}:value -> #{node_id(node.value)};")
  digraph.nodes << <<~DOT
    #{id} [
      label=<#{table.to_dot.gsub(/\n/, "\n  ")}>
    ];
  DOT
  super
end