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

Document supported escape sequences for string literals #117

Open
patjakdev opened this issue Jul 15, 2024 · 0 comments
Open

Document supported escape sequences for string literals #117

patjakdev opened this issue Jul 15, 2024 · 0 comments

Comments

@patjakdev
Copy link

patjakdev commented Jul 15, 2024

What were you trying to do?

Understand the syntax for escaping unicode code points and other characters in string literals.

What is wrong and why?

The Policy grammar page describes the string literal syntax as:

STR ::= Fully-escaped Unicode surrounded by '"'s

But it doesn't explain how to escape the unicode at all. Upon reading the Rust library source code, I found it somewhat surprising that the Rustic approach of \u{x...} is used which is somewhat different from many other libraries which use the fixed-width \uxxxx escape approach.

What do we need to do to fix this?

Document how to escape characters (a leading \) and what escape sequences are supported (n, r, u{...}, etc).

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

1 participant