instance method
Prism::Translation::Ripper#visit_yield_node
visit_yield_node(node)
lib/prism/translation/ripper.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/translation/ripper.rb, line 3271
def visit_yield_node(node)
if node.arguments.nil? && node.lparen_loc.nil?
bounds(node.location)
on_yield0
else
arguments =
if node.arguments.nil?
bounds(node.location)
on_args_new
else
visit(node.arguments)
end
unless node.lparen_loc.nil?
bounds(node.lparen_loc)
arguments = on_paren(arguments)
end
bounds(node.location)
on_yield(arguments)
end
end
yield ^^^^^
yield 1 ^^^^^^^