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

Fix char pattern matching in unicode #5749

Merged
merged 7 commits into from Oct 31, 2022
Merged

Conversation

bobzhang
Copy link
Member

@bobzhang bobzhang commented Oct 24, 2022

  • Tentative fix, need some clean up

  • Things to do: change Pconst_char char to Pconst_char int to avoid unneeded Obj.magic

  • Res_printer for pattern needs adapting to print Pconst_char 0 which is generated by the compiler

cc @butterunderflow

@cristianoc
Copy link
Collaborator

Waiting for the other PR to change the payload of Const_char first.

@bobzhang
Copy link
Member Author

@butterunderflow the char change is landed, can you do a rebase/cleanup to make this fix available? thanks!

CHANGELOG.md Outdated
@@ -56,6 +56,7 @@

- Add `loading`, `aria-*` DOM element attributes in `JsxDOM.domProps`: `ariaCurrent`, `ariaInvalid`, `ariaAutocomplete`, etc.
- Change the internal representation of props for the lowercase components to record. https://github.com/rescript-lang/syntax/pull/665
- Change the payload of Pconst_char for type safety. https://github.com/rescript-lang/syntax/pull/709
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR should be rebases on the latest version of branch 10.1_release then moved to the section # 10.1.0-rc.3.

Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After rebasing on latest 10.1_release, module syntax needs updating.
Then this should be ready to merge.

butterunderflow and others added 6 commits October 31, 2022 16:20
* change Pconst_char payload (WIP)

* tweak

* tweak

* representation of char for lambda

* lib

* bugfix: replace wrong pp

* libs

* bugfix: replace wrong print

* use unsafe_chr to handle possible overflow char

* safe print int as char

* reduce duplication

* (re)use encodeCodepoint to support string_of_int_as_char

* some refactor

* libs

* changelog
@bobzhang bobzhang changed the title Fix char pattern Fix char pattern matching in unicode Oct 31, 2022
@bobzhang
Copy link
Member Author

@butterunderflow in 7d15ea8 I adjusted string_of_int_as_char a little bit to avoid regressions

@bobzhang bobzhang merged commit 1f2505f into 10.1_release Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants