instance method
Prism::InspectVisitor#visit_return_node
visit_return_node(node)
lib/prism/inspect_visitor.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/inspect_visitor.rb, line 2097
def visit_return_node(node)
commands << [inspect_node("ReturnNode", node), indent]
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
commands << ["├── keyword_loc: #{inspect_location(node.keyword_loc)}\n", indent]
if (arguments = node.arguments).nil?
commands << ["└── arguments: ∅\n", indent]
else
commands << ["└── arguments:\n", indent]
commands << [arguments, "#{indent} "]
end
end
Inspect a ReturnNode node.