@@ -75,7 +75,7 @@ let expr_mapper (self : mapper) (e : Parsetree.expression) =
7575 match e.pexp_desc with
7676 (* * Its output should not be rewritten anymore *)
7777 | Pexp_extension extension ->
78- Ast_exp_extension. handle_extension Js_config. record_as_js_object e self extension
78+ Ast_exp_extension. handle_extension e self extension
7979 | Pexp_constant (
8080 Pconst_string
8181 (s, (Some delim)))
@@ -134,26 +134,6 @@ let expr_mapper (self : mapper) (e : Parsetree.expression) =
134134 end
135135 | Pexp_apply (fn , args ) ->
136136 Ast_exp_apply. app_exp_mapper e self fn args
137- | Pexp_record (label_exprs , opt_exp ) ->
138- (* could be supported using `Object.assign`?
139- type
140- {[
141- external update : 'a Js.t -> 'b Js.t -> 'a Js.t = ""
142- constraint 'b :> 'a
143- ]}
144- *)
145- if ! Js_config. record_as_js_object then
146- (match opt_exp with
147- | None ->
148- { e with
149- pexp_desc =
150- Ast_util. record_as_js_object e.pexp_loc self label_exprs;
151- }
152- | Some e ->
153- Location. raise_errorf
154- ~loc: e.pexp_loc " `with` construct is not supported in js obj " )
155- else
156- default_expr_mapper self e
157137 | Pexp_object {pcstr_self; pcstr_fields} ->
158138 (match Ast_attributes. process_bs e.pexp_attributes with
159139 | true , pexp_attributes
@@ -204,7 +184,7 @@ let expr_mapper (self : mapper) (e : Parsetree.expression) =
204184
205185
206186let typ_mapper (self : mapper ) (typ : Parsetree.core_type ) =
207- Ast_core_type_class_type. typ_mapper Js_config. record_as_js_object self typ
187+ Ast_core_type_class_type. typ_mapper self typ
208188
209189let class_type_mapper (self : mapper ) ({pcty_attributes; pcty_loc} as ctd : Parsetree.class_type ) =
210190 match Ast_attributes. process_bs pcty_attributes with
0 commit comments