|
@@ -110,6 +110,7 @@ type extern_api = {
|
|
set_js_generator : (value -> unit) -> unit;
|
|
set_js_generator : (value -> unit) -> unit;
|
|
get_local_type : unit -> t option;
|
|
get_local_type : unit -> t option;
|
|
get_expected_type : unit -> t option;
|
|
get_expected_type : unit -> t option;
|
|
|
|
+ get_constructor_arguments : unit -> Ast.expr list option;
|
|
get_local_method : unit -> string;
|
|
get_local_method : unit -> string;
|
|
get_local_using : unit -> tclass list;
|
|
get_local_using : unit -> tclass list;
|
|
get_local_vars : unit -> (string, Type.tvar) PMap.t;
|
|
get_local_vars : unit -> (string, Type.tvar) PMap.t;
|
|
@@ -2437,6 +2438,11 @@ let macro_lib =
|
|
| None -> VNull
|
|
| None -> VNull
|
|
| Some t -> encode_type t
|
|
| Some t -> encode_type t
|
|
);
|
|
);
|
|
|
|
+ "constructor_arguments", Fun0 (fun() ->
|
|
|
|
+ match (get_ctx()).curapi.get_constructor_arguments() with
|
|
|
|
+ | None -> VNull
|
|
|
|
+ | Some el -> enc_array (List.map encode_expr el)
|
|
|
|
+ );
|
|
"local_method", Fun0 (fun() ->
|
|
"local_method", Fun0 (fun() ->
|
|
VString ((get_ctx()).curapi.get_local_method())
|
|
VString ((get_ctx()).curapi.get_local_method())
|
|
);
|
|
);
|