instance method
Prism::DotVisitor#visit_yield_node
visit_yield_node(node)
lib/prism/dot_visitor.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/dot_visitor.rb, line 4574
def visit_yield_node(node)
table = Table.new("YieldNode")
id = node_id(node)
# keyword_loc
table.field("keyword_loc", location_inspect(node.keyword_loc))
# lparen_loc
unless (lparen_loc = node.lparen_loc).nil?
table.field("lparen_loc", location_inspect(lparen_loc))
end
# arguments
unless (arguments = node.arguments).nil?
table.field("arguments", port: true)
digraph.edge("#{id}:arguments -> #{node_id(arguments)};")
end
# rparen_loc
unless (rparen_loc = node.rparen_loc).nil?
table.field("rparen_loc", location_inspect(rparen_loc))
end
digraph.nodes << <<~DOT
#{id} [
label=<#{table.to_dot.gsub(/\n/, "\n ")}>
];
DOT
super
end
Visit a YieldNode node.