Class: Teacher::FunctionCall
- Inherits:
-
Treetop::Runtime::SyntaxNode
- Object
- Treetop::Runtime::SyntaxNode
- Teacher::FunctionCall
- Defined in:
- lib/teacher/nodes.rb
Instance Method Summary collapse
Instance Method Details
#eval(scope) ⇒ Object
51 52 53 54 55 56 |
# File 'lib/teacher/nodes.rb', line 51 def eval(scope) func = scope[name.text_value] args = elements[2] args = args.is_a?(List) ? args.elements : [args] func.call(scope, args) end |