Class: SyntaxTree::RBracket

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

Overview

RBracket represents the use of a right bracket, 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:) ⇒ RBracket

Returns a new instance of RBracket.



8499
8500
8501
8502
# File 'lib/syntax_tree/node.rb', line 8499

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



8497
8498
8499
# File 'lib/syntax_tree/node.rb', line 8497

def location
  @location
end

#valueObject (readonly)

String

the right bracket



8494
8495
8496
# File 'lib/syntax_tree/node.rb', line 8494

def value
  @value
end