Class: SyntaxTree::EmbExprEnd

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

Overview

EmbExprEnd represents the ending token for using interpolation inside of a parent node that accepts string content (like a string or regular expression).

"Hello, #{person}!"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(value:, location:) ⇒ EmbExprEnd

Returns a new instance of EmbExprEnd.



5607
5608
5609
5610
# File 'lib/syntax_tree.rb', line 5607

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



5605
5606
5607
# File 'lib/syntax_tree.rb', line 5605

def location
  @location
end

#valueObject (readonly)

String

the } used in the string



5602
5603
5604
# File 'lib/syntax_tree.rb', line 5602

def value
  @value
end