Class: SyntaxTree::TStringEnd

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

Overview

TStringEnd represents the end of a string literal.

"string"

In the example above, TStringEnd represents the second set of quotes. Strings can also use single quotes. They can also be declared using the %q and %Q syntax, as in:

%q{string}

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:) ⇒ TStringEnd

Returns a new instance of TStringEnd.



9952
9953
9954
9955
# File 'lib/syntax_tree/node.rb', line 9952

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

Instance Attribute Details

#valueObject (readonly)

String

the end of the string



9950
9951
9952
# File 'lib/syntax_tree/node.rb', line 9950

def value
  @value
end