coco icon indicating copy to clipboard operation
coco copied to clipboard

change behavior of a{ b.c }

Open aeosynth opened this issue 12 years ago • 3 comments

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

aeosynth avatar May 02 '13 20:05 aeosynth

rel : #163

vendethiel avatar May 02 '13 20:05 vendethiel

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.

satyr avatar May 03 '13 02:05 satyr

Use a.b{c} for now.

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

aeosynth avatar May 03 '13 09:05 aeosynth