Class: WLang::Compiler::ToRubyAbstraction
- Defined in:
- lib/wlang/compiler/to_ruby_abstraction.rb
Instance Method Summary collapse
Methods included from Filter::ClassMethods
Methods included from Filter::InstanceMethods
Instance Method Details
#on_fn(code) ⇒ Object
9 10 11 |
# File 'lib/wlang/compiler/to_ruby_abstraction.rb', line 9 def on_fn(code) [:proc, call(code)] end |
#on_strconcat(*cases) ⇒ Object
5 6 7 |
# File 'lib/wlang/compiler/to_ruby_abstraction.rb', line 5 def on_strconcat(*cases) [:multi] + cases.map{|c| call(c)} end |
#on_wlang(symbols, *fns) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/wlang/compiler/to_ruby_abstraction.rb', line 13 def on_wlang(symbols, *fns) meth = Dialect.tag_dispatching_name(symbols) fns.inject [:dispatch, meth] do |rw, fn| rw << call(fn) end end |