File tree 3 files changed +48
-9
lines changed
3 files changed +48
-9
lines changed Original file line number Diff line number Diff line change @@ -271718,12 +271718,23 @@ let handle_debugger loc (payload : Ast_payload.t) =
271718
271718
Ast_external_mk.local_external_apply loc ~pval_prim:[ "#debugger" ]
271719
271719
~pval_type:(Typ.arrow Nolabel (Typ.any ()) (Ast_literal.type_unit ()))
271720
271720
[ Ast_literal.val_unit ~loc () ]
271721
- | _ -> Location.raise_errorf ~loc "bs.debugger does not accept payload"
271721
+ | _ ->
271722
+ Location.raise_errorf ~loc "%%debugger extension doesn't accept arguments"
271722
271723
271723
271724
let handle_raw ~kind loc payload =
271724
271725
let is_function = ref false in
271725
271726
match Ast_payload.raw_as_string_exp_exn ~kind ~is_function payload with
271726
- | None -> Location.raise_errorf ~loc "bs.raw can only be applied to a string"
271727
+ | None -> (
271728
+ match kind with
271729
+ | Raw_re ->
271730
+ Location.raise_errorf ~loc
271731
+ "%%re extension can only be applied to a string"
271732
+ | Raw_exp ->
271733
+ Location.raise_errorf ~loc
271734
+ "%%raw extension can only be applied to a string"
271735
+ | Raw_program ->
271736
+ Location.raise_errorf ~loc
271737
+ "%%%%raw extension can only be applied to a string")
271727
271738
| Some exp ->
271728
271739
{
271729
271740
exp with
@@ -271748,7 +271759,9 @@ let handle_raw_structure loc payload =
271748
271759
~pval_type:(Typ.arrow Nolabel (Typ.any ()) (Typ.any ()))
271749
271760
[ exp ];
271750
271761
}
271751
- | None -> Location.raise_errorf ~loc "bs.raw can only be applied to a string"
271762
+ | None ->
271763
+ Location.raise_errorf ~loc
271764
+ "%%%%raw extension can only be applied to a string"
271752
271765
271753
271766
end
271754
271767
module Ast_exp_extension : sig
Original file line number Diff line number Diff line change @@ -271718,12 +271718,23 @@ let handle_debugger loc (payload : Ast_payload.t) =
271718
271718
Ast_external_mk.local_external_apply loc ~pval_prim:[ "#debugger" ]
271719
271719
~pval_type:(Typ.arrow Nolabel (Typ.any ()) (Ast_literal.type_unit ()))
271720
271720
[ Ast_literal.val_unit ~loc () ]
271721
- | _ -> Location.raise_errorf ~loc "bs.debugger does not accept payload"
271721
+ | _ ->
271722
+ Location.raise_errorf ~loc "%%debugger extension doesn't accept arguments"
271722
271723
271723
271724
let handle_raw ~kind loc payload =
271724
271725
let is_function = ref false in
271725
271726
match Ast_payload.raw_as_string_exp_exn ~kind ~is_function payload with
271726
- | None -> Location.raise_errorf ~loc "bs.raw can only be applied to a string"
271727
+ | None -> (
271728
+ match kind with
271729
+ | Raw_re ->
271730
+ Location.raise_errorf ~loc
271731
+ "%%re extension can only be applied to a string"
271732
+ | Raw_exp ->
271733
+ Location.raise_errorf ~loc
271734
+ "%%raw extension can only be applied to a string"
271735
+ | Raw_program ->
271736
+ Location.raise_errorf ~loc
271737
+ "%%%%raw extension can only be applied to a string")
271727
271738
| Some exp ->
271728
271739
{
271729
271740
exp with
@@ -271748,7 +271759,9 @@ let handle_raw_structure loc payload =
271748
271759
~pval_type:(Typ.arrow Nolabel (Typ.any ()) (Typ.any ()))
271749
271760
[ exp ];
271750
271761
}
271751
- | None -> Location.raise_errorf ~loc "bs.raw can only be applied to a string"
271762
+ | None ->
271763
+ Location.raise_errorf ~loc
271764
+ "%%%%raw extension can only be applied to a string"
271752
271765
271753
271766
end
271754
271767
module Ast_exp_extension : sig
Original file line number Diff line number Diff line change @@ -282115,12 +282115,23 @@ let handle_debugger loc (payload : Ast_payload.t) =
282115
282115
Ast_external_mk.local_external_apply loc ~pval_prim:[ "#debugger" ]
282116
282116
~pval_type:(Typ.arrow Nolabel (Typ.any ()) (Ast_literal.type_unit ()))
282117
282117
[ Ast_literal.val_unit ~loc () ]
282118
- | _ -> Location.raise_errorf ~loc "bs.debugger does not accept payload"
282118
+ | _ ->
282119
+ Location.raise_errorf ~loc "%%debugger extension doesn't accept arguments"
282119
282120
282120
282121
let handle_raw ~kind loc payload =
282121
282122
let is_function = ref false in
282122
282123
match Ast_payload.raw_as_string_exp_exn ~kind ~is_function payload with
282123
- | None -> Location.raise_errorf ~loc "bs.raw can only be applied to a string"
282124
+ | None -> (
282125
+ match kind with
282126
+ | Raw_re ->
282127
+ Location.raise_errorf ~loc
282128
+ "%%re extension can only be applied to a string"
282129
+ | Raw_exp ->
282130
+ Location.raise_errorf ~loc
282131
+ "%%raw extension can only be applied to a string"
282132
+ | Raw_program ->
282133
+ Location.raise_errorf ~loc
282134
+ "%%%%raw extension can only be applied to a string")
282124
282135
| Some exp ->
282125
282136
{
282126
282137
exp with
@@ -282145,7 +282156,9 @@ let handle_raw_structure loc payload =
282145
282156
~pval_type:(Typ.arrow Nolabel (Typ.any ()) (Typ.any ()))
282146
282157
[ exp ];
282147
282158
}
282148
- | None -> Location.raise_errorf ~loc "bs.raw can only be applied to a string"
282159
+ | None ->
282160
+ Location.raise_errorf ~loc
282161
+ "%%%%raw extension can only be applied to a string"
282149
282162
282150
282163
end
282151
282164
module Ast_exp_extension : sig
You can’t perform that action at this time.
0 commit comments