-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Normative: Add Nullish Coalescing #1644
Conversation
The |
Summary: updates parsing of the nullish coalescing operator (`??`) based on the updated stage 3 draft (tc39/ecma262#1644). this specific change happened in tc39/proposal-nullish-coalescing#39. Changelog: fix(parser): Updated parsing of the experimental nullish coalescing `??` operator. It now has a lower precedence than `||` and `&&`, and parentheses are required to nest it with them. Reviewed By: gabelevi Differential Revision: D16561382 fbshipit-source-id: 099ef58bc6cfa90ff3a3153636363986aab2f158
@DanielRosenwasser please rebase this PR, and either link to the test262 tests PR, or put one up, prior to the December meeting. Thanks! |
bbd1abf
to
e97c95d
Compare
Fixed as I was typing this, ignore me. |
I did! But I unbroke it and after a little bit of fiddling and waiting, GitHub is less angry with me and let me reopen the PR. 🙂 |
Also, this PR now links to tc39/test262#2402, the test262 additions PR. |
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.
lgtm!
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.
🙌🎉🎊💰
As noted in tc39/proposal-nullish-coalescing#59, the token |
0c2dc5a
to
7f8129b
Compare
@claudepache done. |
- insert space before paren in clause heading - eliminate grammatical parameters from non-defining production - Add 4 <emu-prodref> elements to Annex A - tweak syntax in algorithms - eliminate accidental ambiguity in Punctuator PR tc39#1646 introduced an ambiguity to the lexical grammar: Punctuator derives OtherPunctuator in two different ways -- directly, and indirectly via OptionalChainingPunctuator. It doesn't make sense for OptionalChainingPunctuator to derive OtherPunctuator, so I've eliminated that alternative. - minor grammar refactoring re Punctuator Move the Punctuator production back to its former position. (Grammars are generally written top-down.) - Fix a 'use' production for AsyncConciseBody to match the new defining production - Add an <emu-prodref> for ExpressionBody to Annex A
This change adds the relevant updates for the stage 3 Nullish Coalescing proposal. The intended changes can be viewed at https://tc39.es/proposal-nullish-coalescing/.
The Test262 PR is available at tc39/test262#2402