Class: FunctionDecNode
Overview
Function Nodes
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(node, value) ⇒ FunctionDecNode
constructor
A new instance of FunctionDecNode.
Methods inherited from Node
Constructor Details
#initialize(node, value) ⇒ FunctionDecNode
50 51 52 53 54 |
# File 'lib/nodes/stmtnodes.rb', line 50 def initialize(node, value) super(value) @name = node @args = node.args end |
Instance Method Details
#evaluate ⇒ Object
56 57 58 59 |
# File 'lib/nodes/stmtnodes.rb', line 56 def evaluate ScopeManager.add_func_to_global_scope(@name, @value, @args) return nil end |