File tree Expand file tree Collapse file tree 3 files changed +48
-9
lines changed Expand file tree Collapse file tree 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) =
271718271718 Ast_external_mk.local_external_apply loc ~pval_prim:[ "#debugger" ]
271719271719 ~pval_type:(Typ.arrow Nolabel (Typ.any ()) (Ast_literal.type_unit ()))
271720271720 [ 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"
271722271723
271723271724let handle_raw ~kind loc payload =
271724271725 let is_function = ref false in
271725271726 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")
271727271738 | Some exp ->
271728271739 {
271729271740 exp with
@@ -271748,7 +271759,9 @@ let handle_raw_structure loc payload =
271748271759 ~pval_type:(Typ.arrow Nolabel (Typ.any ()) (Typ.any ()))
271749271760 [ exp ];
271750271761 }
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"
271752271765
271753271766end
271754271767module 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) =
271718271718 Ast_external_mk.local_external_apply loc ~pval_prim:[ "#debugger" ]
271719271719 ~pval_type:(Typ.arrow Nolabel (Typ.any ()) (Ast_literal.type_unit ()))
271720271720 [ 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"
271722271723
271723271724let handle_raw ~kind loc payload =
271724271725 let is_function = ref false in
271725271726 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")
271727271738 | Some exp ->
271728271739 {
271729271740 exp with
@@ -271748,7 +271759,9 @@ let handle_raw_structure loc payload =
271748271759 ~pval_type:(Typ.arrow Nolabel (Typ.any ()) (Typ.any ()))
271749271760 [ exp ];
271750271761 }
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"
271752271765
271753271766end
271754271767module 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) =
282115282115 Ast_external_mk.local_external_apply loc ~pval_prim:[ "#debugger" ]
282116282116 ~pval_type:(Typ.arrow Nolabel (Typ.any ()) (Ast_literal.type_unit ()))
282117282117 [ 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"
282119282120
282120282121let handle_raw ~kind loc payload =
282121282122 let is_function = ref false in
282122282123 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")
282124282135 | Some exp ->
282125282136 {
282126282137 exp with
@@ -282145,7 +282156,9 @@ let handle_raw_structure loc payload =
282145282156 ~pval_type:(Typ.arrow Nolabel (Typ.any ()) (Typ.any ()))
282146282157 [ exp ];
282147282158 }
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"
282149282162
282150282163end
282151282164module Ast_exp_extension : sig
You can’t perform that action at this time.
0 commit comments