coco
coco copied to clipboard
change behavior of a{ b.c }
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
rel : #163
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.
Use
a.b{c}for now.
thanks, but for my use case, i want multiple levels of destructuring - a{ b.c, d }