Proposal: Logical Assignment Operators#7385
Conversation
https://github.com/jridgewell/proposal-logical-assignment I'm bringing it [back](babel#516). 😉
6d91bcc to
4aa40e1
Compare
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/6907/ |
| if (next === code) { | ||
| const assign = | ||
| this.hasPlugin("logicalAssignment") && | ||
| this.input.charCodeAt(this.state.pos + 2) === charCodes.equalsTo; |
There was a problem hiding this comment.
Can you use this.expectPlugin?
|
I want to be able to test this in the REPL haha, should we add it to stage 0 or make a -1 lol.. |
|
I don't think stage 0 can be blocked, so my proposal is de-facto stage 0. I'll add it to the preset. |
|
Yeah stage -1 only relevant in that it hasn't been presented, but doesn't matter too much if it will be soon. Either way 👍, I guess we should re-think how we signal stage x presets (given there's been a lot of talk about removing them entirely) |
|
Oh, I forgot to ask you to add this plug-in to https://github.com/babel/babel/blob/master/packages/babel-core/src/transformation/util/missing-plugin-helper.js |
|
Done. |
* Proposal: Logical Assignment Operators https://github.com/jridgewell/proposal-logical-assignment I'm bringing it [back](babel#516). 😉 * Use expectPlugin * Add to stage 0 preset * Add logicalAssignment missing plugin log stuff
https://github.com/jridgewell/proposal-logical-assignment, which I'll hopefully be presenting in March.
I'm bringing it back. 😉
EDIT by @hzoo: test it out here