class SyntaxTree::LabelEnd
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.
Attributes
value[R]
- String
-
the end of the label
Public Class Methods
new(value:, location:)
click to toggle source
# File lib/syntax_tree/node.rb, line 7110 def initialize(value:, location:) @value = value @location = location end
Public Instance Methods
===(other)
click to toggle source
# File lib/syntax_tree/node.rb, line 7136 def ===(other) other.is_a?(LabelEnd) && value === other.value end
accept(visitor)
click to toggle source
# File lib/syntax_tree/node.rb, line 7115 def accept(visitor) visitor.visit_label_end(self) end
child_nodes()
click to toggle source
# File lib/syntax_tree/node.rb, line 7119 def child_nodes [] end
Also aliased as: deconstruct
copy(value: nil, location: nil)
click to toggle source
# File lib/syntax_tree/node.rb, line 7123 def copy(value: nil, location: nil) LabelEnd.new( value: value || self.value, location: location || self.location ) end
deconstruct_keys(_keys)
click to toggle source
# File lib/syntax_tree/node.rb, line 7132 def deconstruct_keys(_keys) { value: value, location: location } end