For language developers on the Rubinius platform, the APIs to the Rubinius generator and other compiler parts are generally very smooth and easy to use. An exception to this is when trying to generate a function/closure. Messing with the low-level APIs turns out to be unwieldy, as they tend to expose quite a lot of detail about Ruby-specific semantics.
The goal of this proposal is to provide a higher-level API optimized for a more general use case.
The file ast.rb
contains the user code, and the file new_api.rb
contains the support code to make it work (what would end up being implemented in some rubinius gem).