WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
121541
Update identifier syntax to disallow U+2E2F in preparation for ES6
https://bugs.webkit.org/show_bug.cgi?id=121541
Summary
Update identifier syntax to disallow U+2E2F in preparation for ES6
Mathias Bynens
Reported
2013-09-18 00:11:24 PDT
TC39 discussed
http://esdiscuss.org/topic/backwards-compatibility-and-u-2e2f-in-identifier-s
and concluded that we should not deviate from Unicode because we don’t want separate lists from Unicode. That means `\u2E2F` and `ⸯ` need to throw when used as identifier. For reference, here’s the same bug ticket for SpiderMonkey:
https://bugzilla.mozilla.org/show_bug.cgi?id=917436
And for V8:
https://code.google.com/p/v8/issues/detail?id=2892
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2013-09-18 11:42:47 PDT
<
rdar://problem/15022545
>
Mathias Bynens
Comment 2
2015-03-04 08:31:31 PST
Some more info & examples of what it means to update to the ES6 grammar for identifiers:
https://mathiasbynens.be/notes/javascript-identifiers-es6
Mathias Bynens
Comment 3
2015-03-09 14:54:12 PDT
Tests based on ES6 and Unicode 5.1.0, i.e. the minimum required Unicode version as per the spec:
https://mathias.html5.org/tests/javascript/identifiers/
Claude Pache
Comment 4
2017-02-07 09:18:22 PST
For reference, the relevant section in the spec is:
https://tc39.github.io/ecma262/#prod-IdentifierName
Alexey Proskuryakov
Comment 5
2017-02-08 17:22:17 PST
Is this still needed for ES6?yus
Mathias Bynens
Comment 6
2017-02-09 00:05:44 PST
(In reply to
comment #5
)
> Is this still needed for ES6?
Yes.
Mathias Bynens
Comment 7
2020-03-13 06:53:34 PDT
This seems to have been fixed: ``` $ eshost -sx 'var \u2E2F' #### Chakra SyntaxError: Invalid character #### JavaScriptCore SyntaxError: Invalid unicode escape in identifier: '\u2E2F' #### SpiderMonkey SyntaxError: invalid escape sequence: #### V8, V8 --harmony SyntaxError: Invalid or unexpected token #### XS SyntaxError: invalid character 10 ``` …and… ``` $ eshost -sx 'var ⸯ' #### Chakra SyntaxError: Invalid character #### JavaScriptCore SyntaxError: Invalid character '\u2e2f' #### SpiderMonkey SyntaxError: illegal character: #### V8, V8 --harmony SyntaxError: Invalid or unexpected token #### XS SyntaxError: invalid character 11823 ```
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug