-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
Support Unicode escape in identifier names #1102
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1102 +/- ##
==========================================
- Coverage 58.81% 58.77% -0.04%
==========================================
Files 176 176
Lines 12467 12501 +34
==========================================
+ Hits 7332 7347 +15
- Misses 5135 5154 +19
Continue to review full report at Codecov.
|
c98ef89
to
8b50842
Compare
This PR is ready for review. The bug related to Unicode escapes in reserved word as property is mentioned in #1117 and I prefer to address it separately. Let me know if you have any comments and suggestions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a comment for my understanding on dead code.
@@ -130,6 +130,7 @@ where | |||
/// predicate on the ascii char | |||
/// | |||
/// The buffer is not incremented. | |||
#[allow(dead_code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we allow dead code here? If it's not being used, it should be removed, right?
Same applies to line 195.
Would it be possible to re-base it to see conformance / benchmark changes? |
I ran this locally, and got these results: Test262 conformance changes:
|
This Pull Request add the support of Unicode escapes (
\uXXXX
and\u{ cp }
) in identifier names. An example for this is:It changes the following:
Some methods in
lexer/cursor.rs
are not used after this PR. Instead of removing them from the source code, I kept them for future use. The#[allow(dead_code)]
is added to prevent clippy error.