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 issue with pattern match escape. #6061

Merged
merged 1 commit into from
Mar 10, 2023
Merged

Conversation

cristianoc
Copy link
Collaborator

Fixes #6060

The compiler's ppx was missing the same processing on patterns it performs on expressions in string constants: handles "js" string transformation. (On expressions it also handles "j" transformations).

Remove compiler error when it encounters pattern matching with processed string.

Changed compiler compilation to assume the cases in string switch are processed string.

There's still the overarching questions of whether the transformation should be performed in the parser instead.

Fixes #6060

The compiler's ppx was missing the same processing on patterns it performs on expressions in string constants: handles "js" string transformation. (On expressions it also handles "j" transformations).

Remove compiler error when it encounters pattern matching with processed string.

Changed compiler compilation to assume the cases in string switch are processed string.

There's still the overarching questions of whether the transformation should be performed in the parser instead.
@cristianoc cristianoc force-pushed the pattern_match_escape branch from 95a83fc to b64a67f Compare March 10, 2023 10:45
@cristianoc cristianoc merged commit 238c1b7 into master Mar 10, 2023
@cristianoc cristianoc deleted the pattern_match_escape branch March 10, 2023 11:51
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.

When used in switch, escape sequences (of strings) are compiled incorrectly
1 participant