Class: SyntaxTree::RBracket

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

Overview

RBracket represents the use of a right bracket, i.e., ].

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, location:) ⇒ RBracket

Returns a new instance of RBracket.



9975
9976
9977
9978
# File 'lib/syntax_tree.rb', line 9975

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



9973
9974
9975
# File 'lib/syntax_tree.rb', line 9973

def location
  @location
end

#valueObject (readonly)

String

the right bracket



9970
9971
9972
# File 'lib/syntax_tree.rb', line 9970

def value
  @value
end