class SyntaxTree::Backref

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/syntax_tree/node.rbs

class SyntaxTree::Backref < SyntaxTree::Node
  def child_nodes: () -> untyped
end


$1
in the form of a $ followed by a positive integer.
Backref represents a global variable referencing a matched value. It comes

def ===(other)

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

def accept(visitor)

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

def child_nodes

Experimental RBS support (using type sampling data from the type_fusion project).

def child_nodes: () -> untyped

This signature was generated using 1 sample from 1 application.

def child_nodes
  []
end

def copy(value: nil, location: nil)

def copy(value: nil, location: nil)
  node =
    Backref.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.text(value)
end

def initialize(value:, location:)

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