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

Attributes inherited from Node

#location

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.



3067
3068
3069
3070
# File 'lib/syntax_tree/node.rb', line 3067

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

Instance Attribute Details

#valueObject (readonly)

String

the comma in the string



3065
3066
3067
# File 'lib/syntax_tree/node.rb', line 3065

def value
  @value
end