File tree Expand file tree Collapse file tree 9 files changed +19
-17
lines changed Expand file tree Collapse file tree 9 files changed +19
-17
lines changed Original file line number Diff line number Diff line change @@ -40,9 +40,9 @@ module S = Js_stmt_make
40
40
*)
41
41
42
42
(* TODO: check stackoverflow *)
43
- let assemble_obj_args (labels : External_arg_spec.t list ) (args : J.expression list )
43
+ let assemble_obj_args (labels : External_arg_spec.obj_params ) (args : J.expression list )
44
44
: J.block * J.expression =
45
- let rec aux (labels : External_arg_spec.t list ) args
45
+ let rec aux (labels : External_arg_spec.obj_params ) args
46
46
: (Js_op.property_name * E.t ) list * J.expression list * _ =
47
47
match labels, args with
48
48
| [] , [] -> [] , [] , []
@@ -101,7 +101,7 @@ let assemble_obj_args (labels : External_arg_spec.t list) (args : J.expression
101
101
| x ::xs -> E. seq (E. fuse_to_seq x xs) (E. obj map)
102
102
end ) ::
103
103
(Ext_list. flat_map assignment (fun
104
- ((xlabel : External_arg_spec.t ), (arg : J.expression )) ->
104
+ ((xlabel : External_arg_spec.obj_param ), (arg : J.expression )) ->
105
105
match xlabel with
106
106
| {arg_label = Optional {name = label } } ->
107
107
(* Need make sure whether assignment is effectful or not
Original file line number Diff line number Diff line change 38
38
*)
39
39
40
40
val assemble_obj_args :
41
- External_arg_spec .t list ->
41
+ External_arg_spec .obj_params ->
42
42
J .expression list ->
43
43
J .block * J .expression
44
44
(* It returns a block in cases we need set the property dynamically: we need
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ type t =
49
49
{ prim_name : string ;
50
50
arg_types : External_arg_spec .params ;
51
51
ffi : External_ffi_types .external_spec }
52
- | Pjs_object_create of External_arg_spec .t list
52
+ | Pjs_object_create of External_arg_spec .obj_params
53
53
(* Exceptions *)
54
54
| Praise
55
55
(* Boolean operations *)
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ type t =
48
48
{ prim_name : string ;
49
49
arg_types : External_arg_spec .params ;
50
50
ffi : External_ffi_types .external_spec }
51
- | Pjs_object_create of External_arg_spec. t list
51
+ | Pjs_object_create of External_arg_spec. obj_params
52
52
53
53
| Praise
54
54
| Psequand | Psequor | Pnot
Original file line number Diff line number Diff line change @@ -963,7 +963,7 @@ let handle_attributes_as_string
963
963
964
964
let pval_prim_of_labels (labels : string Asttypes.loc list ) =
965
965
let arg_kinds =
966
- Ext_list. fold_right labels ([] : External_arg_spec.t list )
966
+ Ext_list. fold_right labels ([] : External_arg_spec.obj_params )
967
967
(fun {loc ; txt } arg_kinds
968
968
->
969
969
let arg_label =
Original file line number Diff line number Diff line change @@ -57,20 +57,20 @@ type attr =
57
57
| Ignore
58
58
| Unwrap
59
59
60
- type t_noname = {
60
+ type param = {
61
61
arg_type : attr ;
62
62
arg_label : label_noname
63
63
}
64
64
65
- type t =
65
+ type obj_param =
66
66
{
67
67
arg_type : attr ;
68
68
arg_label : label
69
69
}
70
70
71
71
72
-
73
- type params = t_noname list
72
+ type obj_params = obj_param list
73
+ type params = param list
74
74
75
75
exception Error of Location. t * Ext_json_parse. error
76
76
Original file line number Diff line number Diff line change @@ -56,17 +56,19 @@ type label_noname =
56
56
| Arg_empty
57
57
| Arg_optional
58
58
59
- type t =
59
+ type obj_param =
60
60
{
61
61
arg_type : attr ;
62
62
arg_label :label
63
63
}
64
64
65
- type t_noname = {
65
+ type param = {
66
66
arg_type : attr ;
67
67
arg_label : label_noname
68
68
}
69
- type params = t_noname list
69
+
70
+ type obj_params = obj_param list
71
+ type params = param list
70
72
71
73
val cst_json : Location .t -> string -> cst
72
74
val cst_int : int -> cst
@@ -76,4 +78,4 @@ val empty_label : label
76
78
val empty_lit : cst -> label
77
79
val label : string -> cst option -> label
78
80
val optional : string -> label
79
- val empty_kind : attr -> t
81
+ val empty_kind : attr -> obj_param
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ type t =
126
126
[return] means return value is unit or not,
127
127
[true] means is [unit]
128
128
*)
129
- | Ffi_obj_create of External_arg_spec .t list
129
+ | Ffi_obj_create of External_arg_spec .obj_params
130
130
| Ffi_inline_const of Lam_constant .t
131
131
| Ffi_normal
132
132
(* When it's normal, it is handled as normal c functional ffi call *)
Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ type t =
105
105
External_arg_spec .params *
106
106
return_wrapper *
107
107
external_spec
108
- | Ffi_obj_create of External_arg_spec .t list
108
+ | Ffi_obj_create of External_arg_spec .obj_params
109
109
| Ffi_inline_const of Lam_constant .t
110
110
| Ffi_normal
111
111
(* When it's normal, it is handled as normal c functional ffi call *)
You can’t perform that action at this time.
0 commit comments