instance method
Prism::Translation::Ripper#visit_constant_path_write_node_target
visit_constant_path_write_node_target(node)
lib/prism/translation/ripper.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/translation/ripper.rb, line 1500
def visit_constant_path_write_node_target(node)
if node.parent.nil?
bounds(node.name_loc)
child = on_const(node.name.to_s)
bounds(node.location)
on_top_const_field(child)
else
parent = visit(node.parent)
bounds(node.name_loc)
child = on_const(node.name.to_s)
bounds(node.location)
on_const_path_field(parent, child)
end
end
Visit a constant path that is part of a write node.