Class: SyntaxTree::TStringEnd

Inherits:
Object
  • Object
show all
Defined in:
lib/syntax_tree.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

Instance Method Summary collapse

Constructor Details

#initialize(value:, location:) ⇒ TStringEnd

Returns a new instance of TStringEnd.



11974
11975
11976
11977
# File 'lib/syntax_tree.rb', line 11974

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



11972
11973
11974
# File 'lib/syntax_tree.rb', line 11972

def location
  @location
end

#valueObject (readonly)

String

the end of the string



11969
11970
11971
# File 'lib/syntax_tree.rb', line 11969

def value
  @value
end