Class: Rubasteme::AST::LambdaExpressionNode
Instance Method Summary
collapse
Methods inherited from ListNode
#elements, #empty?, #first, #rest
Methods inherited from BranchNode
#<<, #[], #[]=, #each, #size, #to_a
Methods inherited from Node
#to_a, #to_s, #type
Constructor Details
Returns a new instance of LambdaExpressionNode.
109
110
111
112
|
# File 'lib/rubasteme/ast/branch_node.rb', line 109
def initialize(_ = nil)
super(2, _)
end
|
Instance Method Details
#body ⇒ Object
122
123
124
|
# File 'lib/rubasteme/ast/branch_node.rb', line 122
def body
@nodes[1]
end
|
#body=(node) ⇒ Object
126
127
128
|
# File 'lib/rubasteme/ast/branch_node.rb', line 126
def body=(node)
@nodes[1] = node
end
|
114
115
116
|
# File 'lib/rubasteme/ast/branch_node.rb', line 114
def formals
@nodes[0]
end
|
118
119
120
|
# File 'lib/rubasteme/ast/branch_node.rb', line 118
def formals=(node)
@nodes[0] = node
end
|