Class: YARP::StringConcatNode
- Inherits:
-
YARPNode
- Object
- YARPNode
- YARP::StringConcatNode
- Defined in:
- lib/yarp/node.rb,
ext/yarp/api_node.c
Overview
Represents the use of compile-time string concatenation.
"foo" "bar"
^^^^^^^^^^^
Instance Attribute Summary collapse
-
#left ⇒ Object
readonly
attr_reader left: Node.
-
#right ⇒ Object
readonly
attr_reader right: Node.
Instance Method Summary collapse
-
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void.
-
#child_nodes ⇒ Object
(also: #deconstruct)
def child_nodes: () -> Array[nil | Node].
- #deconstruct_keys(keys) ⇒ Object
-
#initialize(left, right, location) ⇒ StringConcatNode
constructor
def initialize: (left: Node, right: Node, location: Location) -> void.
Constructor Details
#initialize(left, right, location) ⇒ StringConcatNode
def initialize: (left: Node, right: Node, location: Location) -> void
5710 5711 5712 5713 5714 |
# File 'lib/yarp/node.rb', line 5710 def initialize(left, right, location) @left = left @right = right @location = location end |
Instance Attribute Details
#left ⇒ Object (readonly)
attr_reader left: Node
5704 5705 5706 |
# File 'lib/yarp/node.rb', line 5704 def left @left end |
#right ⇒ Object (readonly)
attr_reader right: Node
5707 5708 5709 |
# File 'lib/yarp/node.rb', line 5707 def right @right end |
Instance Method Details
#accept(visitor) ⇒ Object
def accept: (visitor: Visitor) -> void
5717 5718 5719 |
# File 'lib/yarp/node.rb', line 5717 def accept(visitor) visitor.visit_string_concat_node(self) end |
#child_nodes ⇒ Object Also known as: deconstruct
def child_nodes: () -> Array[nil | Node]
5723 5724 5725 |
# File 'lib/yarp/node.rb', line 5723 def child_nodes [left, right] end |