Class: P2::ExtensionTagNode
- Inherits:
-
Object
- Object
- P2::ExtensionTagNode
- Defined in:
- lib/p2/compiler/nodes.rb
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#call_node ⇒ Object
readonly
Returns the value of attribute call_node.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#tag ⇒ Object
readonly
Returns the value of attribute tag.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(call_node, translator) ⇒ ExtensionTagNode
constructor
A new instance of ExtensionTagNode.
Constructor Details
#initialize(call_node, translator) ⇒ ExtensionTagNode
Returns a new instance of ExtensionTagNode.
169 170 171 172 173 174 |
# File 'lib/p2/compiler/nodes.rb', line 169 def initialize(call_node, translator) @call_node = call_node @tag = call_node.name @location = call_node.location @block = call_node.block && translator.visit(call_node.block) end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
167 168 169 |
# File 'lib/p2/compiler/nodes.rb', line 167 def block @block end |
#call_node ⇒ Object (readonly)
Returns the value of attribute call_node.
167 168 169 |
# File 'lib/p2/compiler/nodes.rb', line 167 def call_node @call_node end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
167 168 169 |
# File 'lib/p2/compiler/nodes.rb', line 167 def location @location end |
#tag ⇒ Object (readonly)
Returns the value of attribute tag.
167 168 169 |
# File 'lib/p2/compiler/nodes.rb', line 167 def tag @tag end |
Instance Method Details
#accept(visitor) ⇒ Object
176 177 178 |
# File 'lib/p2/compiler/nodes.rb', line 176 def accept(visitor) visitor.visit_extension_tag_node(self) end |