uhmanoa-transpiler-project / shaka-scheme

The official repository for the UH Manoa Transpiler Project's Scheme interpreter, Shaka Scheme.
32 stars 24 forks source link

Pull request native closure constructor #52

Closed btwooton closed 6 years ago

btwooton commented 6 years ago

Per the request of the Libraries Team, I have added a specialized constructor to the Closure class to ease the process of binding Closure instances to native C++ callable function objects. This new constructor simply takes in the Callable (std::function<std::deque<NodePtr>(std::deque<NodePtr>)>), as well as a boolean indicating whether or not this is a variadic procedure, and constructs the appropriate Closure object, initializing all of the necessary fields.