Support ES6 Unicode escaped identifiers #941

Closed
getify opened this Issue Mar 4, 2015 · 8 comments

Projects

None yet

3 participants

@getify
getify commented Mar 4, 2015

The new Unicode "code point escape" form is also valid for identifiers, such as:

var \u{2B400} = 42;

AFAICT, no one has implemented this part of the grammar yet. As usual, @mathiasbynens has a bunch of great stuff about what makes a valid Unicode identifier in ES6 vs ES5, etc.


BTW:

I'm not sure, but support of this feature may just need to be that such variables are straight up hygenically renamed to something else entirely, because there's (AFAICT) no equivalent way to do those kind of identifier names in pre-ES6.

@kittens
Member
kittens commented Mar 4, 2015

Please request this upstream at acorn.

@mathiasbynens
Contributor

ternjs/acorn#214 and ternjs/acorn#215 are now fixed.

@kittens
Member
kittens commented Mar 6, 2015

Will take a little longer than I hoped since acorn is radically changing it's structure and will require me to rewrite all the custom acorn extensions (ES7, Flow etc). Once ternjs/acorn#216 is merged I should be able to nut through it in a day.

@kittens kittens modified the milestone: 4.8.0 Mar 15, 2015
@kittens
Member
kittens commented Mar 18, 2015

Fixed in the experimental branch.

@kittens kittens closed this Mar 18, 2015
@getify
getify commented Mar 18, 2015

is this going to stay only in "experimental" mode?

@kittens
Member
kittens commented Mar 18, 2015

No, the experimental branch is the current unstable branch (terrible name I know).

@getify
getify commented Mar 18, 2015

ahh, ok, sorry for misunderstanding. thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment