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