Skip to content

Commit 359cc8c

Browse files
committed
@bs.config -> @config
1 parent d3994b2 commit 359cc8c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+54
-60
lines changed

jscomp/bsc/rescript_compiler_main.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ let buckle_script_flags : (string * Bsc_args.spec * string) array =
457457

458458

459459

460-
(** parse flags in bs.config *)
460+
(** parse flags in config *)
461461
let file_level_flags_handler (e : Parsetree.expression option) =
462462
match e with
463463
| None -> ()

jscomp/build_tests/react_ppx/src/recursive_component_test.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@@warning("-39")
22
// https://github.com/rescript-lang/rescript-compiler/issues/4511
33
/*
4-
[@bs.config {
4+
[@config {
55
flags : [|"-dsource"|]
66
}];
77
*/

jscomp/frontend/ast_config.ml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,8 @@ let process_directives str =
5757
let rec iter_on_bs_config_str (x : Parsetree.structure) =
5858
match x with
5959
| [] -> ()
60-
| {
61-
pstr_desc =
62-
Pstr_attribute (({txt = "bs.config" | "config"; loc}, payload) as attr);
63-
}
64-
:: _ ->
60+
| {pstr_desc = Pstr_attribute (({txt = "config"; loc}, payload) as attr)} :: _
61+
->
6562
Bs_ast_invariant.mark_used_bs_attribute attr;
6663
Ext_list.iter
6764
(Ast_payload.ident_or_record_as_config loc payload)
@@ -76,11 +73,8 @@ let process_str str =
7673
let rec iter_on_bs_config_sig (x : Parsetree.signature) =
7774
match x with
7875
| [] -> ()
79-
| {
80-
psig_desc =
81-
Psig_attribute (({txt = "bs.config" | "config"; loc}, payload) as attr);
82-
}
83-
:: _ ->
76+
| {psig_desc = Psig_attribute (({txt = "config"; loc}, payload) as attr)} :: _
77+
->
8478
Bs_ast_invariant.mark_used_bs_attribute attr;
8579
Ext_list.iter
8680
(Ast_payload.ident_or_record_as_config loc payload)

jscomp/frontend/bs_builtin_ppx.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ let structure_item_mapper (self : mapper) (str : Parsetree.structure_item) :
467467
Pstr_value
468468
(Nonrecursive, [{pvb_pat; pvb_expr; pvb_attributes; pvb_loc}]);
469469
})
470-
| Pstr_attribute ({txt = "bs.config" | "config"}, _) -> str
470+
| Pstr_attribute ({txt = "config"}, _) -> str
471471
| _ -> default_mapper.structure_item self str
472472

473473
let local_module_name =

jscomp/ml/ast_payload.mli

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ val assert_strings : Location.t -> t -> string list
6363
(** as a record or empty
6464
it will accept
6565
66-
{[ [@@@bs.config ]]}
66+
{[ [@@@config ]]}
6767
or
68-
{[ [@@@bs.config no_export ] ]}
68+
{[ [@@@config no_export ] ]}
6969
or
70-
{[ [@@@bs.config { property .. } ]]}
70+
{[ [@@@config { property .. } ]]}
7171
Note that we only
7272
{[
7373
{ flat_property}

jscomp/others/belt_List.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
```
6060
*/
6161

62-
@@bs.config({flags: ["-bs-noassertfalse"]})
62+
@@config({flags: ["-bs-noassertfalse"]})
6363

6464
type t<'a> = list<'a>
6565

jscomp/others/belt_internalAVLset.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* You should have received a copy of the GNU Lesser General Public License
2222
* along with this program; if not, write to the Free Software
2323
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
24-
@@bs.config({flags: ["-bs-noassertfalse"]})
24+
@@config({flags: ["-bs-noassertfalse"]})
2525
type rec node<'value> = {
2626
@as("v") mutable value: 'value,
2727
@as("h") mutable height: int,

jscomp/others/belt_internalAVLtree.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
/* Almost rewritten by authors of ReScript */
1515

16-
@@bs.config({flags: ["-bs-noassertfalse"]})
16+
@@config({flags: ["-bs-noassertfalse"]})
1717
type rec node<'k, 'v> = {
1818
@as("k") mutable key: 'k,
1919
@as("v") mutable value: 'v,

jscomp/others/belt_internalMapInt.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@@bs.config({flags: ["-bs-noassertfalse"]})
1+
@@config({flags: ["-bs-noassertfalse"]})
22

33
type key = int
44

jscomp/others/belt_internalMapString.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@@bs.config({flags: ["-bs-noassertfalse"]})
1+
@@config({flags: ["-bs-noassertfalse"]})
22

33
type key = string
44

0 commit comments

Comments
 (0)