Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime(Js.Re): port @mel.send externals to use @mel.this #1307

Merged
merged 1 commit into from
Jan 20, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions jscomp/runtime/js_re.ml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ external unicode : t -> bool = "unicode"
[@@mel.get]
(** returns a bool indicating whether the [unicode] flag is set *)

external exec : str:string -> t -> result option = "exec"
external exec : str:string -> (t[@mel.this]) -> result option = "exec"
[@@mel.send] [@@mel.return null_to_opt]
(** executes a search on a given string using the given RegExp object

Expand All @@ -173,7 +173,7 @@ let result = re |. Js.Re.exec ~str:"The Quick Brown Fox Jumps Over The Lazy Dog"
@see <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec> MDN
*)

external test : str:string -> t -> bool = "test"
external test : str:string -> (t[@mel.this]) -> bool = "test"
[@@mel.send]
(** tests whether the given RegExp object will match a given string

Expand Down
Loading