instance method
Prism::Translation::RubyParser::Compiler#visit_range_bounds_node
visit_range_bounds_node(node)
lib/prism/translation/ruby_parser.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/translation/ruby_parser.rb, line 1524
def visit_range_bounds_node(node)
if node.is_a?(ParenthesesNode) && node.body.nil?
s(node, :begin)
else
visit(node)
end
end
If the bounds of a range node are empty parentheses, then they do not get replaced by their usual s(:nil), but instead are s(:begin).
See also
#visit_program_node
#visit_range_node
#visit_pre_execution_node
#visit_rational_node
also in
3.4