Class: P2::TextNode

Inherits:
Object
  • Object
show all
Defined in:
lib/p2/compiler/nodes.rb

Overview

Represents a text call

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(call_node, _translator) ⇒ TextNode



111
112
113
114
# File 'lib/p2/compiler/nodes.rb', line 111

def initialize(call_node, _translator)
  @call_node = call_node
  @location = call_node.location
end

Instance Attribute Details

#call_nodeObject (readonly)

Returns the value of attribute call_node.



109
110
111
# File 'lib/p2/compiler/nodes.rb', line 109

def call_node
  @call_node
end

#locationObject (readonly)

Returns the value of attribute location.



109
110
111
# File 'lib/p2/compiler/nodes.rb', line 109

def location
  @location
end

Instance Method Details

#accept(visitor) ⇒ Object



116
117
118
# File 'lib/p2/compiler/nodes.rb', line 116

def accept(visitor)
  visitor.visit_text_node(self)
end