class SyntaxTree::RParen

RParen represents the use of a right parenthesis, i.e., +)+.

Attributes

value[R]
String

the parenthesis

Public Class Methods

new(value:, location:) click to toggle source
# File lib/syntax_tree/node.rb, line 9755
def initialize(value:, location:)
  @value = value
  @location = location
end

Public Instance Methods

===(other) click to toggle source
# File lib/syntax_tree/node.rb, line 9781
def ===(other)
  other.is_a?(RParen) && value === other.value
end
accept(visitor) click to toggle source
# File lib/syntax_tree/node.rb, line 9760
def accept(visitor)
  visitor.visit_rparen(self)
end
child_nodes() click to toggle source
# File lib/syntax_tree/node.rb, line 9764
def child_nodes
  []
end
Also aliased as: deconstruct
copy(value: nil, location: nil) click to toggle source
# File lib/syntax_tree/node.rb, line 9768
def copy(value: nil, location: nil)
  RParen.new(
    value: value || self.value,
    location: location || self.location
  )
end
deconstruct()
Alias for: child_nodes
deconstruct_keys(_keys) click to toggle source
# File lib/syntax_tree/node.rb, line 9777
def deconstruct_keys(_keys)
  { value: value, location: location }
end