@@ -324,8 +324,9 @@ let parse_external_attributes
324324 *)
325325 | scopes -> { st with scopes = scopes }
326326 end
327- | "bs.splice" | "bs.variadic" -> {st with splice = true }
328- | "bs.send" ->
327+ | " bs.splice"
328+ | "bs.variadic" | "variadic" -> {st with splice = true }
329+ | "bs.send" | "send" ->
329330 { st with val_send = name_from_payload_or_prim ~loc payload}
330331 | " bs.send.pipe"
331332 ->
@@ -720,21 +721,21 @@ let external_desc_of_non_obj
720721 return_wrapper = _ ;
721722 } ->
722723 (* PR #2162 - since when we assemble arguments the first argument in
723- [@@bs. send] is ignored
724+ [@@send] is ignored
724725 *)
725726 begin match arg_type_specs with
726727 | [] ->
727728 Location. raise_errorf
728- ~loc " Ill defined attribute [@@bs. send] (the external needs to be a regular function call with at least one argument)"
729+ ~loc " Ill defined attribute @ send(the external needs to be a regular function call with at least one argument)"
729730 | {arg_type = Arg_cst _ ; arg_label = _} :: _
730731 ->
731732 Location. raise_errorf
732- ~loc " Ill defined attribute [@@bs. send] (first argument can't be const)"
733+ ~loc " Ill defined attribute @ send(first argument can't be const)"
733734 | _ :: _ ->
734735 Js_send {splice ; name; js_send_scopes = scopes ; pipe = false }
735736 end
736737 | {val_send = #bundle_source ; _ }
737- -> Location. raise_errorf ~loc " You used a FFI attribute that can't be used with [@@bs. send] "
738+ -> Location. raise_errorf ~loc " You used a FFI attribute that can't be used with @ send"
738739 | {val_send_pipe = Some _;
739740 (* splice = (false as splice); *)
740741 val_send = `Nm_na ;
@@ -909,17 +910,17 @@ let handle_attributes
909910 if i = 0 && splice then
910911 begin match arg_label with
911912 | Optional _ ->
912- Location. raise_errorf ~loc " [@@@@bs.splice] expect the last type to be a non optional"
913+ Location. raise_errorf ~loc " @@variadic expect the last type to be a non optional"
913914 | Labelled _ | Nolabel
914915 ->
915916 if ty.ptyp_desc = Ptyp_any then
916- Location. raise_errorf ~loc " [@@@@bs.splice] expect the last type to be an array" ;
917+ Location. raise_errorf ~loc " @@variadic expect the last type to be an array" ;
917918 if spec_of_ptyp true ty <> Nothing then
918- Location. raise_errorf ~loc " [@@@@bs.splice] expect the last type to be an array" ;
919+ Location. raise_errorf ~loc " @@variadic expect the last type to be an array" ;
919920 match ty.ptyp_desc with
920921 | Ptyp_constr ({txt = Lident " array" ; _}, [_])
921922 -> ()
922- | _ -> Location. raise_errorf ~loc " [@@@@bs.splice] expect the last type to be an array" ;
923+ | _ -> Location. raise_errorf ~loc " @@variadic expect the last type to be an array" ;
923924 end ;
924925 let (arg_label : External_arg_spec.label_noname ), arg_type, new_arg_types =
925926 match arg_label with
0 commit comments