Class: SyntaxTree::Comma

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

Overview

Comma represents the use of the , operator.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, location:) ⇒ Comma

Returns a new instance of Comma.



3630
3631
3632
3633
# File 'lib/syntax_tree.rb', line 3630

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



3628
3629
3630
# File 'lib/syntax_tree.rb', line 3628

def location
  @location
end

#valueObject (readonly)

String

the comma in the string



3625
3626
3627
# File 'lib/syntax_tree.rb', line 3625

def value
  @value
end