[ruby/prism] Implement next for ripper translation

107ffb64a3
This commit is contained in:
Kevin Newton 2024-03-05 07:13:38 -05:00 committed by git
parent a47d0f03db
commit c947852fa8

View file

@ -1380,7 +1380,15 @@ module Prism
# next foo # next foo
# ^^^^^^^^ # ^^^^^^^^
def visit_next_node(node) def visit_next_node(node)
raise NoMethodError, __method__ if node.arguments.nil?
bounds(node.location)
on_next(on_args_new)
else
arguments = visit_array_node_elements(node.arguments.arguments)
bounds(node.location)
on_next(on_args_add_block(arguments, false))
end
end end
# nil # nil