Skip to content

Commit 5daf6c8

Browse files
committed
save BS_NATIVE macro
1 parent 376cf90 commit 5daf6c8

File tree

6 files changed

+24
-35
lines changed

6 files changed

+24
-35
lines changed

jscomp/syntax/ast_exp_apply.ml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,7 @@ let app_exp_mapper
209209
Ast_attributes.is_bs with
210210
| None -> default_expr_mapper self e
211211
| Some pexp_attributes ->
212-
#if BS_NATIVE then
213-
{e with pexp_attributes }
214-
#else
215-
{e with pexp_desc = Ast_util.uncurry_fn_apply e.pexp_loc self fn (check_and_discard args) ;
216-
pexp_attributes }
217-
218-
219-
#end
212+
if !Clflags.bs_only then
213+
{e with pexp_desc = Ast_util.uncurry_fn_apply e.pexp_loc self fn (check_and_discard args) ;
214+
pexp_attributes }
215+
else {e with pexp_attributes } (* BS_NATIVE branch*)

lib/4.02.3/bsdep.ml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39131,12 +39131,10 @@ let app_exp_mapper
3913139131
Ast_attributes.is_bs with
3913239132
| None -> default_expr_mapper self e
3913339133
| Some pexp_attributes ->
39134-
39135-
{e with pexp_desc = Ast_util.uncurry_fn_apply e.pexp_loc self fn (check_and_discard args) ;
39136-
pexp_attributes }
39137-
39138-
39139-
39134+
if !Clflags.bs_only then
39135+
{e with pexp_desc = Ast_util.uncurry_fn_apply e.pexp_loc self fn (check_and_discard args) ;
39136+
pexp_attributes }
39137+
else {e with pexp_attributes } (* BS_NATIVE branch*)
3914039138

3914139139
end
3914239140
module Ast_exp_extension : sig

lib/4.02.3/bsppx.ml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21237,12 +21237,10 @@ let app_exp_mapper
2123721237
Ast_attributes.is_bs with
2123821238
| None -> default_expr_mapper self e
2123921239
| Some pexp_attributes ->
21240-
21241-
{e with pexp_desc = Ast_util.uncurry_fn_apply e.pexp_loc self fn (check_and_discard args) ;
21242-
pexp_attributes }
21243-
21244-
21245-
21240+
if !Clflags.bs_only then
21241+
{e with pexp_desc = Ast_util.uncurry_fn_apply e.pexp_loc self fn (check_and_discard args) ;
21242+
pexp_attributes }
21243+
else {e with pexp_attributes } (* BS_NATIVE branch*)
2124621244

2124721245
end
2124821246
module Ast_exp_extension : sig

lib/4.02.3/unstable/js_compiler.ml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21118,12 +21118,10 @@ let app_exp_mapper
2111821118
Ast_attributes.is_bs with
2111921119
| None -> default_expr_mapper self e
2112021120
| Some pexp_attributes ->
21121-
21122-
{e with pexp_desc = Ast_util.uncurry_fn_apply e.pexp_loc self fn (check_and_discard args) ;
21123-
pexp_attributes }
21124-
21125-
21126-
21121+
if !Clflags.bs_only then
21122+
{e with pexp_desc = Ast_util.uncurry_fn_apply e.pexp_loc self fn (check_and_discard args) ;
21123+
pexp_attributes }
21124+
else {e with pexp_attributes } (* BS_NATIVE branch*)
2112721125

2112821126
end
2112921127
module Ast_exp_extension : sig

lib/4.02.3/unstable/native_ppx.ml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19449,9 +19449,10 @@ let app_exp_mapper
1944919449
Ast_attributes.is_bs with
1945019450
| None -> default_expr_mapper self e
1945119451
| Some pexp_attributes ->
19452-
19453-
{e with pexp_attributes }
19454-
19452+
if !Clflags.bs_only then
19453+
{e with pexp_desc = Ast_util.uncurry_fn_apply e.pexp_loc self fn (check_and_discard args) ;
19454+
pexp_attributes }
19455+
else {e with pexp_attributes } (* BS_NATIVE branch*)
1945519456

1945619457
end
1945719458
module Ast_signature : sig

lib/4.02.3/whole_compiler.ml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117692,12 +117692,10 @@ let app_exp_mapper
117692117692
Ast_attributes.is_bs with
117693117693
| None -> default_expr_mapper self e
117694117694
| Some pexp_attributes ->
117695-
117696-
{e with pexp_desc = Ast_util.uncurry_fn_apply e.pexp_loc self fn (check_and_discard args) ;
117697-
pexp_attributes }
117698-
117699-
117700-
117695+
if !Clflags.bs_only then
117696+
{e with pexp_desc = Ast_util.uncurry_fn_apply e.pexp_loc self fn (check_and_discard args) ;
117697+
pexp_attributes }
117698+
else {e with pexp_attributes } (* BS_NATIVE branch*)
117701117699

117702117700
end
117703117701
module Ast_external : sig

0 commit comments

Comments
 (0)