Represents a write to a multi-target expression.

a, b, c = 1, 2, 3
^^^^^^^^^^^^^^^^^
Attributes
Read

Represents the targets expressions before a splat node.

a, b, * = 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
      ^^^^
Read

The value to write to the targets. It can be any [non-void expression](github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).

a, b, c = 1, 2, 3
          ^^^^^^^
Class Methods

Initialize a new MultiWriteNode 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]

def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node) -> MultiWriteNode

An alias for child_nodes

def inspect -> String

def lparen: () -> String?

The location of the opening parenthesis.

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

def operator: () -> String

The location of the operator.

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 operator_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`.