instance method
Prism::InspectVisitor#visit_embedded_statements_node
visit_embedded_statements_node(node)
lib/prism/inspect_visitor.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/prism/inspect_visitor.rb, line 846
def visit_embedded_statements_node(node)
commands << [inspect_node("EmbeddedStatementsNode", node), indent]
flags = [("newline" if node.newline?), ("static_literal" if node.static_literal?), ].compact
commands << ["├── flags: #{flags.empty? ? "∅" : flags.join(", ")}\n", indent]
commands << ["├── opening_loc: #{inspect_location(node.opening_loc)}\n", indent]
if (statements = node.statements).nil?
commands << ["├── statements: ∅\n", indent]
else
commands << ["├── statements:\n", indent]
commands << [statements, "#{indent}│ "]
end
commands << ["└── closing_loc: #{inspect_location(node.closing_loc)}\n", indent]
end
Inspect a EmbeddedStatementsNode node.
See also
#visit_else_node
#visit_embedded_variable_node
#visit_def_node
#visit_ensure_node
also in
3.4