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.



9530
9531
9532
9533
# File 'lib/syntax_tree.rb', line 9530

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



9528
9529
9530
# File 'lib/syntax_tree.rb', line 9528

def location
  @location
end

#valueObject (readonly)

String

the beginning of the array literal



9525
9526
9527
# File 'lib/syntax_tree.rb', line 9525

def value
  @value
end