Re: Allow Object Destructoring when assigning

2018-03-23 Thread Isiah Meadows
Oops...I misinterpreted the original email. :-) As for forcing reinterpretation, I stand by my suggestion in an earlier reply: > It's not easy to parse for similar reasons async arrow functions are a > bitch to parse, but it appears possible (it'd force a shift instead of > a reduce, and it'd rei

Re: Allow Object Destructoring when assigning

2018-03-22 Thread Claude Pache
> Le 22 mars 2018 à 20:51, Sebastian Malton a écrit : > > Currently object destructoring is only allowed during variable declaration, > however it would be useful, and seems rather odd from a usage standpoint, > that it cannot be done during assignment. > > Example: > This is a allowed: > `

Re: Allow Object Destructoring when assigning

2018-03-22 Thread Isiah Meadows
It's not easy to parse for similar reasons async arrow functions are a bitch to parse, but it appears possible (it'd force a shift instead of a reduce, and it'd reinterpret the RHS unambiguously as a pattern) with a `[no LineTerminator here]` before the `=` token. - Isiah Meadows m...@isiahmea

Allow Object Destructoring when assigning

2018-03-22 Thread Sebastian Malton
Currently object destructoring is only allowed during variable declaration, however it would be useful, and seems rather odd from a usage standpoint, that it cannot be done during assignment. Example:This is a allowed:```const { a } = b;```But this is not:```let a;if (...) {    { a } = b.c;}```