instance method
Prism::Translation::Ripper#visit_statements_node_body
visit_statements_node_body(body)
lib/prism/translation/ripper.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/translation/ripper.rb, line 2947
def visit_statements_node_body(body)
body.inject(on_stmts_new) do |stmts, stmt|
on_stmts_add(stmts, stmt.nil? ? on_void_stmt : visit(stmt))
end
end
Visit the list of statements of a statements node. We support nil statements in the list. This would normally not be allowed by the structure of the prism parse tree, but we manually add them here so that we can mirror Ripper’s void stmt.
See also
#visit_statements_node
#visit_string_content
#visit_splat_node
#visit_string_node
also in
3.4