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

Can't use unicode escape in native reason #2337

Closed
saitonakamura opened this issue Feb 14, 2019 · 7 comments
Closed

Can't use unicode escape in native reason #2337

saitonakamura opened this issue Feb 14, 2019 · 7 comments

Comments

@saitonakamura
Copy link

I can't get how to use unicode escaping in reason
i'm writing let oghamSpace = "\u{1680}"; looking at this PR ocaml/ocaml#1232
but i'm getting Warning 14: illegal backslash escape in string.

@OvermindDL1
Copy link

OvermindDL1 commented Feb 14, 2019

What's your backing version of ocaml? (ocamlc -version of whichever your reason toolline is calling)

As I recall it requires a minimum version of OCaml 4.06 (but it might have been 4.06.1 or 4.07?).

@anmonteiro
Copy link
Member

@OvermindDL1 even if OCaml has support for it we need to actually implement it in the Reason lexer.

@hcarty
Copy link
Contributor

hcarty commented Feb 14, 2019

I tested here on OCaml 4.07.1 + Reason 3.4.0. utop accepts it without issue, but rtop gives the same warning @saitonakamura reported, so it does look like it's a missing feature in the Reason lexer.

@saitonakamura
Copy link
Author

I stumbled upon this in Revery package.json, so it's looks like ocaml version is alright

@jordwalke
Copy link
Member

Thanks for the report. @hcarty Do you know how to fix this in the Reason lexer? I think that's where this fix would go. And then it would get backported to all previous ocaml compiler versions automatically when using Reason.

@hcarty
Copy link
Contributor

hcarty commented Mar 20, 2019

@jordwalke I think the ocaml/ocaml#1232 PR's code could be reused almost directly. I think using that code, though, would require someone with consortium license access to pull it in in order to keep things friendly with Reason's MIT license.

@anmonteiro
Copy link
Member

fixed in #2738

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

No branches or pull requests

5 participants