Represents a multi-target expression.

a, (b, c) = 1, 2, 3
   ^^^^^^

This can be a part of ‘MultiWriteNode` as above, or the target of a `for` loop

for a, b in [[1, 2], [3, 4]]
    ^^^^
Attributes
Read

Represents the targets expressions before a splat node.

a, (b, c, *) = 1, 2, 3, 4, 5
    ^^^^

The splat node can be absent, in that case all target expressions are in the left field.

a, (b, c) = 1, 2, 3, 4, 5
    ^^^^
Read

Represents a splat node in the target expression.

a, (b, *c) = 1, 2, 3, 4
       ^^

The variable can be empty, this results in a ‘SplatNode` with a `nil` expression field.

a, (b, *) = 1, 2, 3, 4
       ^

If the ‘*` is omitted, this field will contain an `ImplicitRestNode`

a, (b,) = 1, 2, 3, 4
     ^
Read

Represents the targets expressions after a splat node.

a, (*, b, c) = 1, 2, 3, 4, 5
       ^^^^
Class Methods

Initialize a new MultiTargetNode node.

Return a symbol representation of this node type. See ‘Node::type`.

Instance Methods

Implements case-equality for the node. This is effectively == but without comparing the value of locations. Locations are checked only for presence.

def accept: (Visitor visitor) -> void

def child_nodes: () -> Array[nil | Node]

def comment_targets: () -> Array[Node | Location]

An alias for child_nodes

def inspect -> String

def lparen: () -> String?

The location of the opening parenthesis.

a, (b, c) = 1, 2, 3
   ^

def rparen: () -> String?

The location of the closing parenthesis.

a, (b, c) = 1, 2, 3
        ^

Save the lparen_loc location using the given saved source so that it can be retrieved later.

Save the rparen_loc location using the given saved source so that it can be retrieved later.

Return a symbol representation of this node type. See ‘Node#type`.