class Nydp::Builtin::RubyWrap @@builtins = { } def self.builtins @@builtins end class Coder < Struct.new(:name, :size, :code, :helpers) def msize ; size + 1 ; end def arg_mapper case size when 0 ; "" when 1 ; ", a0" when 2 ; ", a0, a1" when 3 ; ", a0, a1, a2" when 4 ; ", a0, a1, a2, a3" else ; raise "maximum 4 arguments!" end end def to_ruby generic_code = code. gsub(/a0/, "args.car"). gsub(/a1/, "args.cdr.car"). gsub(/a2/, "args.cdr.cdr.car"). gsub(/a3/, "args.cdr.cdr.cdr.car") <