-
Notifications
You must be signed in to change notification settings - Fork 471
Clean up string processing: delimiters #7852
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
base: master
Are you sure you want to change the base?
Conversation
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
@codex review this change and explain the use of the various kinds of strings. |
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.
Codex Review: Here are some suggestions.
Reply with @codex fix comments
to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
@cristianoc For now it should be just a refactor that shouldn't change any behavior. |
and property_map = (property_name * expression) list | ||
and length_object = Js_op.length_object | ||
and delim = External_arg_spec.delim = DNone | DStarJ | DNoQuotes | DBackQuotes | ||
and string_kind = String_kind.t = Standard | Verbatim | RawJs | Template |
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.
The current naming (DStarJ and such) is pretty bad, but I'm not a big fan of Standard and Verbatim, Verbatim is a double quoted string right? First time I hear about verbatim for strings but might be more common in other languages. But what about standard, what does it mean?
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'll revisit this next week. Maybe I'll split the PR into two to separate the renaming from the other changes, and maybe we want to choose different names.
c8c1654
to
280efe0
Compare
280efe0
to
7379d01
Compare
First step in cleaning up string processing in the compiler. Define a unified
String_kind.t
as follows (replacing the existingdelim
type), make it mandatory and use it throughout the compiler pipeline (with the exception of the Parsetree for now).