satyr / coco

Unfancy CoffeeScript
http://satyr.github.com/coco/
MIT License
498 stars 48 forks source link

change behavior of a{ b.c } #221

Open aeosynth opened 11 years ago

aeosynth commented 11 years ago

request a{ b.c } -> { c: a.b.c }, instead of { c: a[b.c] }

$ coco -bce '{ a.b.c }'
Error: Parse error on line 1: Unexpected 'DOT'

that would probably have to parse

vendethiel commented 11 years ago

rel : #163

satyr commented 11 years ago

Treating the whole chain of subdestructuring assignee as sub-tail should be viable, but probably not very useful/intuitive until #163 is resolved. E.g.: a{(b.c)d}{d: a[b.c]d}

Use a.b{c} for now.

aeosynth commented 11 years ago

Use a.b{c} for now.

thanks, but for my use case, i want multiple levels of destructuring - a{ b.c, d }