class EleetScript::LambdaNode
Public Instance Methods
eval(context)
click to toggle source
# File lib/lang/interpreter.rb, line 321 def eval(context) method = EleetScriptMethod.new(nil, params, body, context) context.root_ns["Lambda"].new_with_value(method, context) end
to_s(level = 0)
click to toggle source
# File lib/lang/nodes.rb, line 146 def to_s(level = 0) tabs = spaces(level) str = "#{tabs}<EleetScript::LambdaNode\n" str += "#{tabs} @params=#{params.inspect}\n" if body.nodes.length > 0 str += "#{tabs} @body=(\n" str += body.to_s(level + 2) str += "#{tabs} )\n#{tabs}>\n" else str += "#{tabs} @body=nil\n#{tabs}>\n" end str end