Class: SyntaxTree::LBracket

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

Overview

LBracket represents the use of a left bracket, i.e., [.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, location:) ⇒ LBracket

Returns a new instance of LBracket.



7475
7476
7477
7478
# File 'lib/syntax_tree.rb', line 7475

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



7473
7474
7475
# File 'lib/syntax_tree.rb', line 7473

def location
  @location
end

#valueObject (readonly)

String

the left bracket



7470
7471
7472
# File 'lib/syntax_tree.rb', line 7470

def value
  @value
end