Class: P2::TextNode
- Inherits:
-
Object
- Object
- P2::TextNode
- Defined in:
- lib/p2/compiler/nodes.rb
Overview
Represents a text call
Instance Attribute Summary collapse
-
#call_node ⇒ Object
readonly
Returns the value of attribute call_node.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(call_node, _translator) ⇒ TextNode
constructor
A new instance of TextNode.
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_node ⇒ Object (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 |
#location ⇒ Object (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 |