Class: SyntaxTree::TStringEnd
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
-
#location ⇒ Object
readonly
- Location
-
the location of this node.
-
#value ⇒ Object
readonly
- String
-
the end of the string.
Instance Method Summary collapse
-
#initialize(value:, location:) ⇒ TStringEnd
constructor
A new instance of TStringEnd.
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.
10357 10358 10359 10360 |
# File 'lib/syntax_tree/node.rb', line 10357 def initialize(value:, location:) @value = value @location = location end |
Instance Attribute Details
#location ⇒ Object (readonly)
- Location
-
the location of this node
10355 10356 10357 |
# File 'lib/syntax_tree/node.rb', line 10355 def location @location end |
#value ⇒ Object (readonly)
- String
-
the end of the string
10352 10353 10354 |
# File 'lib/syntax_tree/node.rb', line 10352 def value @value end |