-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
feat: remove Js.String2, use labeled arguments for Js.String #893
Conversation
return { | ||
TAG: /* Eq */0, | ||
_0: [ | ||
"a", | ||
"#", | ||
undefined | ||
], | ||
_1: "a#b#:c".split(/(#)(:)?/, 3) | ||
_1: (function (param) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expected since the test uses |>
.
Before we merge this, we should add a test for string interpolation that fails in the current PR state. There's still a mention of Lines 463 to 464 in ac03e24
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I didn't go through all cases where a simplification can be applied, as I want to know your thoughts about that suggestion first.
*) | ||
|
||
(** [codePointAt n s] returns the code point at position [n] within string [s] as a [Some] value. The return value handles code points greater than or equal to [0x10000]. If there is no code point at the given position, the function returns [None]. | ||
external codePointAt : t -> pos:int -> int option = "codePointAt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe can rename pos
to index
: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/codePointAt#index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used ~pos
because that's what OCaml's StdLabels
uses.
I like your suggestion. Check my reply in #895 (comment) |
part of the unification proposed in #731
this needs the melange v3 long-lived branch in reason-react to compile the template projects.