class SyntaxTree::RBracket
RBracket
represents the use of a right bracket, i.e., ]
.
Attributes
value[R]
- String
-
the right bracket
Public Class Methods
new(value:, location:)
click to toggle source
# File lib/syntax_tree/node.rb, line 8985 def initialize(value:, location:) @value = value @location = location end
Public Instance Methods
===(other)
click to toggle source
# File lib/syntax_tree/node.rb, line 9011 def ===(other) other.is_a?(RBracket) && value === other.value end
accept(visitor)
click to toggle source
# File lib/syntax_tree/node.rb, line 8990 def accept(visitor) visitor.visit_rbracket(self) end
child_nodes()
click to toggle source
# File lib/syntax_tree/node.rb, line 8994 def child_nodes [] end
Also aliased as: deconstruct
copy(value: nil, location: nil)
click to toggle source
# File lib/syntax_tree/node.rb, line 8998 def copy(value: nil, location: nil) RBracket.new( value: value || self.value, location: location || self.location ) end
deconstruct_keys(_keys)
click to toggle source
# File lib/syntax_tree/node.rb, line 9007 def deconstruct_keys(_keys) { value: value, location: location } end