lezer-parser / javascript

A JavaScript lezer grammar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Computed property names in object destructuring

bmeurer opened this issue · comments

The current grammar doesn't support computed property names in object destructuring, for example

const {[Symbol.iterator]: iterator} = array;

is valid JavaScript (and TypeScript), but CodeMirror gets highly confused about what it's looking at.

cc @jaro-sevcik

I didn't even know that was a thing! Attached patch adds support.

Wow, thanks!