Class: P2::BlockInvocationNode
- Inherits:
-
Object
- Object
- P2::BlockInvocationNode
- 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.
Instance Method Summary collapse
- #accept(visitor) ⇒ Object
-
#initialize(call_node, translator) ⇒ BlockInvocationNode
constructor
A new instance of BlockInvocationNode.
Constructor Details
#initialize(call_node, translator) ⇒ BlockInvocationNode
Returns a new instance of BlockInvocationNode.
184 185 186 187 188 189 |
# File 'lib/p2/compiler/nodes.rb', line 184 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.
182 183 184 |
# File 'lib/p2/compiler/nodes.rb', line 182 def block @block end |
#call_node ⇒ Object (readonly)
Returns the value of attribute call_node.
182 183 184 |
# File 'lib/p2/compiler/nodes.rb', line 182 def call_node @call_node end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
182 183 184 |
# File 'lib/p2/compiler/nodes.rb', line 182 def location @location end |
Instance Method Details
#accept(visitor) ⇒ Object
191 192 193 |
# File 'lib/p2/compiler/nodes.rb', line 191 def accept(visitor) visitor.visit_block_invocation_node(self) end |