Sha256: b021bb19aa3f3c2ffe4bac3a1b7676a9a9258c3d0ff0782b1bd60b968b96a628
Contents?: true
Size: 473 Bytes
Versions: 15
Compression:
Stored size: 473 Bytes
Contents
module WLang class Compiler class ToRubyAbstraction < Filter def on_strconcat(*cases) [:multi] + cases.map{|c| call(c)} end def on_fn(code) [:proc, call(code)] end def on_wlang(symbols, *fns) meth = Dialect.tag_dispatching_name(symbols) fns.inject [:dispatch, meth] do |rw, fn| rw << call(fn) end end end # class ToRubyAbstraction end # class Compiler end # module WLang
Version data entries
15 entries across 15 versions & 1 rubygems