File tree Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Expand file tree Collapse file tree 3 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -680,7 +680,9 @@ and expression_desc cxt ~(level:int) f x : cxt =
680
680
(match info with
681
681
| Exp exp_info ->
682
682
let raw_paren =
683
- not (match exp_info with Js_literal _ -> true | _ -> false || raw_snippet_exp_simple_enough s) in
683
+ not (match exp_info with
684
+ | Js_literal _ | Js_raw_json -> true
685
+ | Js_function _ | Js_exp_unknown -> false || raw_snippet_exp_simple_enough s) in
684
686
if raw_paren then P. string f L. lparen;
685
687
P. string f s ;
686
688
if raw_paren then P. string f L. rparen;
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ type exp =
40
40
| RegExp of RegExp.t
41
41
]}
42
42
*)
43
+ | Js_raw_json
43
44
| Js_exp_unknown
44
45
45
46
Original file line number Diff line number Diff line change @@ -129,7 +129,7 @@ let translate_arg_cst (cst : External_arg_spec.cst) =
129
129
E. str i
130
130
| Arg_js_null -> E. nil
131
131
| Arg_js_json s
132
- -> E. raw_js_code (Exp Js_exp_unknown ) s
132
+ -> E. raw_js_code (Exp Js_raw_json ) s
133
133
134
134
| Arg_js_true -> E. bool true
135
135
| Arg_js_false -> E. bool false
You can’t perform that action at this time.
0 commit comments