class SyntaxTree::MLHS
first, second, third = value
of a multiple assignment.
MLHS represents a list of values being destructured on the left-hand side
def ===(other)
def ===(other) other.is_a?(MLHS) && ArrayMatch.call(parts, other.parts) && comma === other.comma end
def accept(visitor)
def accept(visitor) visitor.visit_mlhs(self) end
def child_nodes
def child_nodes parts end
def copy(parts: nil, location: nil, comma: nil)
def copy(parts: nil, location: nil, comma: nil) node = MLHS.new( parts: parts || self.parts, location: location || self.location, comma: comma || self.comma ) node.comments.concat(comments.map(&:copy)) node end
def deconstruct_keys(_keys)
def deconstruct_keys(_keys) { parts: parts, location: location, comma: comma, comments: comments } end
def format(q)
def format(q) q.seplist(parts) { |part| q.format(part) } q.text(",") if comma end
def initialize(parts:, location:, comma: false)
def initialize(parts:, location:, comma: false) @parts = parts @comma = comma @location = location @comments = [] end