Class: SyntaxTree::StringContent

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

Overview

StringContent represents the contents of a string-like value.

"string"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parts:, location:) ⇒ StringContent

Returns a new instance of StringContent.



11162
11163
11164
11165
# File 'lib/syntax_tree.rb', line 11162

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



11160
11161
11162
# File 'lib/syntax_tree.rb', line 11160

def location
  @location
end

#partsObject (readonly)

Array[ StringEmbExpr | StringDVar | TStringContent ]

the parts of the

string



11157
11158
11159
# File 'lib/syntax_tree.rb', line 11157

def parts
  @parts
end