Class: SyntaxTree::LabelEnd
- Inherits:
-
Object
- Object
- SyntaxTree::LabelEnd
- 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
-
#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.
Constructor Details
#initialize(value:, location:) ⇒ LabelEnd
Returns a new instance of LabelEnd.
7725 7726 7727 7728 |
# File 'lib/syntax_tree.rb', line 7725 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
- Location
-
the location of this node
7723 7724 7725 |
# File 'lib/syntax_tree.rb', line 7723 def location @location end |
#value ⇒ Object (readonly)
- String
-
the end of the label
7720 7721 7722 |
# File 'lib/syntax_tree.rb', line 7720 def value @value end |