Class: SyntaxTree::LabelEnd
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
-
#location ⇒ Object
readonly
- Location
-
the location of this node.
-
#value ⇒ Object
readonly
- String
-
the end of the label.
Instance Method Summary collapse
-
#initialize(value:, location:) ⇒ LabelEnd
constructor
A new instance of LabelEnd.
Methods inherited from Node
#child_nodes, #deconstruct, #deconstruct_keys, #format, #pretty_print, #to_json
Constructor Details
#initialize(value:, location:) ⇒ LabelEnd
Returns a new instance of LabelEnd.
6825 6826 6827 6828 |
# File 'lib/syntax_tree/node.rb', line 6825 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
- Location
-
the location of this node
6823 6824 6825 |
# File 'lib/syntax_tree/node.rb', line 6823 def location @location end |
#value ⇒ Object (readonly)
- String
-
the end of the label
6820 6821 6822 |
# File 'lib/syntax_tree/node.rb', line 6820 def value @value end |