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.



9113
9114
9115
9116
# File 'lib/syntax_tree.rb', line 9113

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



9111
9112
9113
# File 'lib/syntax_tree.rb', line 9111

def location
  @location
end

#valueObject (readonly)

String

the beginning of the array literal



9108
9109
9110
# File 'lib/syntax_tree.rb', line 9108

def value
  @value
end