Class: SyntaxTree::Comma

Inherits:
Node
  • Object
show all
Defined in:
lib/syntax_tree/node.rb

Overview

Comma represents the use of the , operator.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#child_nodes, #deconstruct, #deconstruct_keys, #format, #pretty_print, #to_json

Constructor Details

#initialize(value:, location:) ⇒ Comma

Returns a new instance of Comma.



3163
3164
3165
3166
# File 'lib/syntax_tree/node.rb', line 3163

def initialize(value:, location:)
  @value = value
  @location = location
end

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



3161
3162
3163
# File 'lib/syntax_tree/node.rb', line 3161

def location
  @location
end

#valueObject (readonly)

String

the comma in the string



3158
3159
3160
# File 'lib/syntax_tree/node.rb', line 3158

def value
  @value
end