class SyntaxTree::PinnedVarRef

a class variable, a global variable, or an instance variable.
This can be a plain local variable like the example above. It can also be a
end
in ^variable
case value
matching pattern.
PinnedVarRef represents a pinned variable reference within a pattern

def ===(other)

def ===(other)
  other.is_a?(PinnedVarRef) && value === other.value
end

def accept(visitor)

def accept(visitor)
  visitor.visit_pinned_var_ref(self)
end

def child_nodes

def child_nodes
  [value]
end

def copy(value: nil, location: nil)

def copy(value: nil, location: nil)
  node =
    PinnedVarRef.new(
      value: value || self.value,
      location: location || self.location
    )
  node.comments.concat(comments.map(&:copy))
  node
end

def deconstruct_keys(_keys)

def deconstruct_keys(_keys)
  { value: value, location: location, comments: comments }
end

def format(q)

def format(q)
  q.group do
    q.text("^")
    q.format(value)
  end
end

def initialize(value:, location:)

def initialize(value:, location:)
  @value = value
  @location = location
  @comments = []
end