Class: SyntaxTree::QSymbolsBeg

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

Overview

QSymbolsBeg represents the beginning of a symbol literal array.

%i[one two three]

In the snippet above, QSymbolsBeg represents the “%i[” token. Note that these kinds of arrays can start with a lot of different delimiter types (e.g., %i| or %i<).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, location:) ⇒ QSymbolsBeg

Returns a new instance of QSymbolsBeg.



9606
9607
9608
9609
# File 'lib/syntax_tree.rb', line 9606

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



9604
9605
9606
# File 'lib/syntax_tree.rb', line 9604

def location
  @location
end

#valueObject (readonly)

String

the beginning of the array literal



9601
9602
9603
# File 'lib/syntax_tree.rb', line 9601

def value
  @value
end