class SyntaxTree::Comma

Comma represents the use of the , operator.

Attributes

value[R]
String

the comma in the string

Public Class Methods

new(value:, location:) click to toggle source
# File lib/syntax_tree/node.rb, line 3417
def initialize(value:, location:)
  @value = value
  @location = location
end

Public Instance Methods

===(other) click to toggle source
# File lib/syntax_tree/node.rb, line 3440
def ===(other)
  other.is_a?(Comma) && value === other.value
end
accept(visitor) click to toggle source
# File lib/syntax_tree/node.rb, line 3422
def accept(visitor)
  visitor.visit_comma(self)
end
child_nodes() click to toggle source
# File lib/syntax_tree/node.rb, line 3426
def child_nodes
  []
end
Also aliased as: deconstruct
copy(value: nil, location: nil) click to toggle source
# File lib/syntax_tree/node.rb, line 3430
def copy(value: nil, location: nil)
  Comma.new(value: value || self.value, location: location || self.location)
end
deconstruct()
Alias for: child_nodes
deconstruct_keys(_keys) click to toggle source
# File lib/syntax_tree/node.rb, line 3436
def deconstruct_keys(_keys)
  { value: value, location: location }
end