instance method
Prism::InspectVisitor#visit_call_operator_write_node
visit_call_operator_write_node(node)
lib/prism/inspect_visitor.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/inspect_visitor.rb, line 415
def visit_call_operator_write_node(node)
commands << [inspect_node("CallOperatorWriteNode", node), indent]
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("safe_navigation" if node.safe_navigation?), ("variable_call" if node.variable_call?), ("attribute_write" if node.attribute_write?), ("ignore_visibility" if node.ignore_visibility?)].compact
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
if (receiver = node.receiver).nil?
commands << ["├── receiver: ∅\n", indent]
else
commands << ["├── receiver:\n", indent]
commands << [receiver, "#{indent}│ "]
end
commands << ["├── call_operator_loc: #{inspect_location(node.call_operator_loc)}\n", indent]
commands << ["├── message_loc: #{inspect_location(node.message_loc)}\n", indent]
commands << ["├── read_name: #{node.read_name.inspect}\n", indent]
commands << ["├── write_name: #{node.write_name.inspect}\n", indent]
commands << ["├── binary_operator: #{node.binary_operator.inspect}\n", indent]
commands << ["├── binary_operator_loc: #{inspect_location(node.binary_operator_loc)}\n", indent]
commands << ["└── value:\n", indent]
commands << [node.value, "#{indent} "]
end
Inspect a CallOperatorWriteNode node.