Class: SyntaxTree::LabelEnd

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

Overview

LabelEnd represents the end of a dynamic symbol.

{ "key": value }

In the example above, LabelEnd represents the “\”:“ token at the end of the hash key. This node is important for determining the type of quote being used by the label.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, location:) ⇒ LabelEnd

Returns a new instance of LabelEnd.



7857
7858
7859
7860
# File 'lib/syntax_tree.rb', line 7857

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



7855
7856
7857
# File 'lib/syntax_tree.rb', line 7855

def location
  @location
end

#valueObject (readonly)

String

the end of the label



7852
7853
7854
# File 'lib/syntax_tree.rb', line 7852

def value
  @value
end