class SyntaxTree::Comma
Comma
represents the use of the , operator.
Attributes
- String
-
the comma in the string
Public Class Methods
Source
# File lib/syntax_tree/node.rb, line 3432 def initialize(value:, location:) @value = value @location = location end
Public Instance Methods
Source
# File lib/syntax_tree/node.rb, line 3455 def ===(other) other.is_a?(Comma) && value === other.value end
Source
# File lib/syntax_tree/node.rb, line 3437 def accept(visitor) visitor.visit_comma(self) end
Source
# File lib/syntax_tree/node.rb, line 3441 def child_nodes [] end
Also aliased as: deconstruct
Source
# File lib/syntax_tree/node.rb, line 3445 def copy(value: nil, location: nil) Comma.new(value: value || self.value, location: location || self.location) end
Source
# File lib/syntax_tree/node.rb, line 3451 def deconstruct_keys(_keys) { value: value, location: location } end