-
Notifications
You must be signed in to change notification settings - Fork 463
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
When used in switch
, escape sequences (of strings) are compiled incorrectly
#6060
Milestone
Comments
cristianoc
added a commit
that referenced
this issue
Mar 10, 2023
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
added a commit
that referenced
this issue
Mar 10, 2023
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
added a commit
that referenced
this issue
Mar 10, 2023
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
added a commit
that referenced
this issue
Mar 10, 2023
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
added a commit
that referenced
this issue
Mar 10, 2023
* Fix issue with pattern match escape. 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. * Remove unused file.
cristianoc
added a commit
that referenced
this issue
Mar 10, 2023
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
actual output (by the latest playground as of today)
I expect the two
case
s to becase "\""
andcase "\\"
instead. Not that escape sequences that are used outside theswitch
-case
context are translated appropriately.The text was updated successfully, but these errors were encountered: