Skip to content

Commit

Permalink
[cs] WIP - delegates
Browse files Browse the repository at this point in the history
  • Loading branch information
waneck committed Mar 3, 2014
1 parent 436dc31 commit 0518d1e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions gencommon.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2763,9 +2763,15 @@ struct
* handling parameterized anonymous function declaration (optional - tparam_anon_decl and tparam_anon_acc)
*)

let rec cleanup_delegate e = match e.eexpr with
| TParenthesis e | TMeta(_,e)
| TCast(e,_) -> cleanup_delegate e
| _ -> e

let traverse gen ?tparam_anon_decl ?tparam_anon_acc (transform_closure:texpr->texpr->string->texpr) (handle_anon_func:texpr->tfunc->texpr) (dynamic_func_call:texpr->texpr) e =
let rec run e =
match e.eexpr with
| TCast({ eexpr = TCall({}, ) }, _)
(* parameterized functions handling *)
| TVar(vv, ve) -> (match tparam_anon_decl with
| None -> Type.map_expr run e
Expand Down

0 comments on commit 0518d1e

Please sign in to comment.