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

Convert \u{} in identifiers into UTF-8 #62

Closed
strager opened this issue Oct 9, 2020 · 1 comment
Closed

Convert \u{} in identifiers into UTF-8 #62

strager opened this issue Oct 9, 2020 · 1 comment
Assignees

Comments

@strager
Copy link
Collaborator

strager commented Oct 9, 2020

When quick-lint-js encounters an identifier with an escape sequence, it replaces the escape sequence with the escaped character:

let a = "hello";
console.log(\u{61});  // Prints 'hello'. '\u{61}' is replaced with 'a' in-place during lexing.

Currently, we only support ASCII characters. We should support non-ASCII characters:

let \u{0220} = "hello";
console.log(\u{61});  // Prints 'hello'. '\u{0220}' should be replaced with bytes 0xC8 0xA0 in-place during lexing.

Note: Recognizing unescaped non-ASCII characters is out of scope for this task.

@strager strager mentioned this issue Oct 9, 2020
7 tasks
@strager strager added this to the public release (v1.0) milestone Oct 29, 2020
@strager strager self-assigned this Dec 16, 2020
@strager
Copy link
Collaborator Author

strager commented Dec 18, 2020

Landed in commits c960e7a and 340c0da.

@strager strager closed this as completed Dec 18, 2020
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