module SFRP::Poly::DSL
Public Instance Methods
call_e(func_str, *arg_exps)
click to toggle source
# File lib/sfrp/poly/dsl.rb, line 39 def call_e(func_str, *arg_exps) FuncCallExp.new(func_str, arg_exps) end
func(func_str, ret_type_annot = nil, &block)
click to toggle source
# File lib/sfrp/poly/dsl.rb, line 13 def func(func_str, ret_type_annot = nil, &block) fp = FuncProxy.new(func_str, ret_type_annot) block.call(fp) if block fp.to_func end
match_e(left_exp, &block)
click to toggle source
# File lib/sfrp/poly/dsl.rb, line 33 def match_e(left_exp, &block) cp = CaseProxy.new block.call(cp) if block MatchExp.new(left_exp, cp.to_a) end
node(node_str, type_annot = nil, &block)
click to toggle source
# File lib/sfrp/poly/dsl.rb, line 19 def node(node_str, type_annot = nil, &block) np = NodeProxy.new(node_str, type_annot) block.call(np) if block np.to_node end
pany(ref_var_str = nil)
click to toggle source
# File lib/sfrp/poly/dsl.rb, line 59 def pany(ref_var_str = nil) Pattern.new(nil, ref_var_str, []) end
pat(vconst_str, *arg_patterns)
click to toggle source
# File lib/sfrp/poly/dsl.rb, line 51 def pat(vconst_str, *arg_patterns) Pattern.new(vconst_str, nil, arg_patterns) end
pref(vconst_str, ref_var_str, *arg_patterns)
click to toggle source
# File lib/sfrp/poly/dsl.rb, line 55 def pref(vconst_str, ref_var_str, *arg_patterns) Pattern.new(vconst_str, ref_var_str, arg_patterns) end
t(tconst_str, *args)
click to toggle source
# File lib/sfrp/poly/dsl.rb, line 25 def t(tconst_str, *args) TypeAnnotationType.new(tconst_str, args) end
tconst(tconst_str, var_strs, static, native_str, infinite, &block)
click to toggle source
# File lib/sfrp/poly/dsl.rb, line 6 def tconst(tconst_str, var_strs, static, native_str, infinite, &block) tp = TConstProxy.new(tconst_str, var_strs, infinite) block.call(tp) if block argc = var_strs.size TConst.new(tconst_str, argc, tp.vconst_strs, static, native_str) end
tv(var_str)
click to toggle source
# File lib/sfrp/poly/dsl.rb, line 29 def tv(var_str) TypeAnnotationVar.new(var_str) end
v_e(var_str)
click to toggle source
# File lib/sfrp/poly/dsl.rb, line 47 def v_e(var_str) VarRefExp.new(var_str) end
vc_call_e(vconst_str, *arg_exps)
click to toggle source
# File lib/sfrp/poly/dsl.rb, line 43 def vc_call_e(vconst_str, *arg_exps) VConstCallExp.new(vconst_str, arg_exps) end