class Prism::DotVisitor
def visit_interpolated_x_string_node(node)
def visit_interpolated_x_string_node(node) table = Table.new("InterpolatedXStringNode") id = node_id(node) # opening_loc table.field("opening_loc", location_inspect(node.opening_loc)) # parts if node.parts.any? table.field("parts", port: true) waypoint = "#{id}_parts" digraph.waypoint("#{waypoint};") digraph.edge("#{id}:parts -> #{waypoint};") node.parts.each { |child| digraph.edge("#{waypoint} -> #{node_id(child)};") } else table.field("parts", "[]") end # closing_loc table.field("closing_loc", location_inspect(node.closing_loc)) digraph.nodes << <<~DOT #{id} [ label=<#{table.to_dot.gsub(/\n/, "\n ")}> ]; DOT super end