Class: Rubasteme::AST::ProcedureCallNode
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 ProcedureCallNode.
86
87
88
89
|
# File 'lib/rubasteme/ast/branch_node.rb', line 86
def initialize(_ = nil)
super(1, _)
end
|
Instance Method Details
#add_operand(node) ⇒ Object
103
104
105
|
# File 'lib/rubasteme/ast/branch_node.rb', line 103
def add_operand(node)
@nodes << node
end
|
#operands ⇒ Object
99
100
101
|
# File 'lib/rubasteme/ast/branch_node.rb', line 99
def operands
@nodes[1..-1]
end
|
#operator ⇒ Object
91
92
93
|
# File 'lib/rubasteme/ast/branch_node.rb', line 91
def operator
@nodes[0]
end
|
#operator=(node) ⇒ Object
95
96
97
|
# File 'lib/rubasteme/ast/branch_node.rb', line 95
def operator=(node)
@nodes[0] = node
end
|