Class: SyntaxTree::RParen

Inherits:
Node
  • Object
show all
Defined in:
lib/syntax_tree/node.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#child_nodes, #deconstruct, #deconstruct_keys, #format, #pretty_print, #to_json

Constructor Details

#initialize(value:, location:) ⇒ RParen

Returns a new instance of RParen.



9259
9260
9261
9262
# File 'lib/syntax_tree/node.rb', line 9259

def initialize(value:, location:)
  @value = value
  @location = location
end

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



9257
9258
9259
# File 'lib/syntax_tree/node.rb', line 9257

def location
  @location
end

#valueObject (readonly)

String

the parenthesis



9254
9255
9256
# File 'lib/syntax_tree/node.rb', line 9254

def value
  @value
end