-
-
Notifications
You must be signed in to change notification settings - Fork 411
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
Deny Unicode Escapes in boolean and null expressions #2931
Conversation
9dabbaf
to
13e5cd6
Compare
Codecov Report
@@ Coverage Diff @@
## main #2931 +/- ##
==========================================
- Coverage 52.09% 50.39% -1.70%
==========================================
Files 435 443 +8
Lines 43713 45346 +1633
==========================================
+ Hits 22771 22851 +80
- Misses 20942 22495 +1553
|
|
Since there seems to be not explicit test for this in the 262 suite, could you add some tests for this that make sure the parser produces syntax errors in these cases? |
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, check my comment to see on how we might improve this :)
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.
Thanks for the contribution! @veera-sivarajan Looks perfect to me! :)
Should we try to add such a test to Test262, or report it at least? |
I have opened a PR for the same. |
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.
Really nice job, great contribution!
This Pull Request fixes/closes #2771.
This PR keeps track of
ContainsEscapeSequence
in allTokenKind::BooleanLiteral
andTokenKind::NullLiteral
and throws an error when it gets parsed as an expression.Opening a different PR for this since I messed up the commit history of the previous PR.