Module: Jade::Codegen::Inline
Constant Summary
Constants included from Helpers
Instance Method Summary collapse
Methods included from Helpers
data_define, dict_constraints, dict_synthetic_name, fn_constraints, fn_impl_synthetic_name, generate_many, generate_node, impl_synthetic_name, param_synthetic_name, resolve_callee_symbol, ruby_classes_for_type, to_qualified
Instance Method Details
#try_for(callee, args, dictionaries, registry) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/jade/codegen/inline.rb', line 7 def try_for(callee, args, dictionaries, registry) try_sort_by_block(callee, args, dictionaries, registry) .then { return it if it } try_block_form(callee, args, registry) .then { return it if it } fn = resolve_inline_fn(callee, dictionaries, registry) return nil unless fn && fn.arity == args.size fn.call(*args.map { generate_node(it, registry) }) end |