Class: Rubasteme::AST::BodyNode
- Inherits:
-
HoldingSequenceBaseNode
- Object
- Node
- BranchNode
- ListNode
- HoldingSequenceBaseNode
- Rubasteme::AST::BodyNode
- Defined in:
- lib/rubasteme/ast/branch_node.rb
Instance Method Summary collapse
- #definitions ⇒ Object
- #definitions=(node) ⇒ Object
-
#initialize(_ = nil) ⇒ BodyNode
constructor
A new instance of BodyNode.
Methods inherited from HoldingSequenceBaseNode
Methods inherited from ListNode
#elements, #empty?, #first, #rest
Methods inherited from BranchNode
#<<, #[], #[]=, #each, #size, #to_a
Methods inherited from Node
Constructor Details
#initialize(_ = nil) ⇒ BodyNode
Returns a new instance of BodyNode.
159 160 161 162 |
# File 'lib/rubasteme/ast/branch_node.rb', line 159 def initialize(_ = nil) # @nodes = [<definitions>, <sequence>] super(2, 1, _) end |
Instance Method Details
#definitions ⇒ Object
164 165 166 |
# File 'lib/rubasteme/ast/branch_node.rb', line 164 def definitions @nodes[0] end |
#definitions=(node) ⇒ Object
168 169 170 |
# File 'lib/rubasteme/ast/branch_node.rb', line 168 def definitions=(node) @nodes[0] = node end |