instance method
Prism::InspectVisitor#visit_in_node
visit_in_node(node)
lib/prism/inspect_visitor.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/inspect_visitor.rb, line 1159
def visit_in_node(node)
commands << [inspect_node("InNode", node), indent]
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
commands << ["├── pattern:\n", indent]
commands << [node.pattern, "#{indent}│ "]
if (statements = node.statements).nil?
commands << ["├── statements: ∅\n", indent]
else
commands << ["├── statements:\n", indent]
commands << [statements, "#{indent}│ "]
end
commands << ["├── in_loc: #{inspect_location(node.in_loc)}\n", indent]
commands << ["└── then_loc: #{inspect_location(node.then_loc)}\n", indent]
end
Inspect a InNode node.