Method: SyntaxTree::YARV::Compiler#visit_string_concat

Defined in:
lib/syntax_tree/yarv/compiler.rb

#visit_string_concat(node) ⇒ Object



1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
# File 'lib/syntax_tree/yarv/compiler.rb', line 1594

def visit_string_concat(node)
  value = node.left.parts.first.value + node.right.parts.first.value

  visit_string_literal(
    StringLiteral.new(
      parts: [TStringContent.new(value: value, location: node.location)],
      quote: node.left.quote,
      location: node.location
    )
  )
end