Class: NScript::ClosureNode
- Inherits:
-
Object
- Object
- NScript::ClosureNode
- Defined in:
- lib/nscript/parser/nodes.rb
Class Method Summary collapse
Class Method Details
.wrap(expressions, statement = false) ⇒ Object
683 684 685 686 687 |
# File 'lib/nscript/parser/nodes.rb', line 683 def self.wrap(expressions, statement=false) func = ParentheticalNode.new(CodeNode.new([], Expressions.wrap(expressions))) call = CallNode.new(ValueNode.new(func, AccessorNode.new(Value.new('call'))), [Value.new('this')]) statement ? Expressions.wrap(call) : call end |