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.



10490
10491
10492
10493
# File 'lib/syntax_tree.rb', line 10490

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

Instance Attribute Details

#locationObject (readonly)

Location

the location of this node



10488
10489
10490
# File 'lib/syntax_tree.rb', line 10488

def location
  @location
end

#partsObject (readonly)

Array[ StringEmbExpr | StringDVar | TStringContent ]

the parts of the

string



10485
10486
10487
# File 'lib/syntax_tree.rb', line 10485

def parts
  @parts
end