class YARP::StringConcatNode
Represents the use of compile-time string concatenation.
"foo" "bar" ^^^^^^^^^^^
Attributes
left[R]
attr_reader left: Node
right[R]
attr_reader right: Node
Public Class Methods
Public Instance Methods
accept(visitor)
click to toggle source
def accept: (visitor: Visitor
) -> void
# File yarp/node.rb, line 9928 def accept(visitor) visitor.visit_string_concat_node(self) end
child_nodes()
click to toggle source
def child_nodes
: () -> Array[nil | Node]
# File yarp/node.rb, line 9933 def child_nodes [left, right] end
Also aliased as: deconstruct
comment_targets()
click to toggle source
def comment_targets
: () -> Array[Node | Location]
# File yarp/node.rb, line 9938 def comment_targets [left, right] end
copy(**params)
click to toggle source
def copy: (**params) -> StringConcatNode
# File yarp/node.rb, line 9943 def copy(**params) StringConcatNode.new( params.fetch(:left) { left }, params.fetch(:right) { right }, params.fetch(:location) { location }, ) end
deconstruct_keys(keys)
click to toggle source
inspect(inspector = NodeInspector.new)
click to toggle source
# File yarp/node.rb, line 9959 def inspect(inspector = NodeInspector.new) inspector << inspector.header(self) inspector << "├── left:\n" inspector << inspector.child_node(left, "│ ") inspector << "└── right:\n" inspector << inspector.child_node(right, " ") inspector.to_str end