instance method
Prism::InspectVisitor#visit_block_parameter_node
visit_block_parameter_node(node)
lib/prism/inspect_visitor.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/inspect_visitor.rb, line 312
def visit_block_parameter_node(node)
commands << [inspect_node("BlockParameterNode", node), indent]
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ("repeated_parameter" if node.repeated_parameter?)].compact
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
if (name = node.name).nil?
commands << ["├── name: ∅\n", indent]
else
commands << ["├── name: #{name.inspect}\n", indent]
end
commands << ["├── name_loc: #{inspect_location(node.name_loc)}\n", indent]
commands << ["└── operator_loc: #{inspect_location(node.operator_loc)}\n", indent]
end
Inspect a BlockParameterNode node.