Community
Participate
Working Groups
ECMA 2016 (7th edition) has been approved already. We need to support all the new changes. http://www.2ality.com/2016/01/ecmascript-2016.htmls 1) Make sure the parser can handle the new syntax 2) Provide a unique problem id and quick fix if ES7 code is encountered when project is configured for ES5/ES6. 3) Add tests to ensure occurrences/outliner/assist/validation work
I think you meant: http://www.2ality.com/2016/01/ecmascript-2016.html
The good news is that acorn supports the new exponentiation operator (**) is the parser is set with ecma version being 7.
The exponentiation operator support is on line 2648 in acorn.js. Line 1281 doesn't mention 7 for the "supported" values. This should probably be adjusted. var defaultOptions = { // `ecmaVersion` indicates the ECMAScript version to parse. Must // be either 3, or 5, or 6. This influences support for strict // mode, the set of reserved words, support for getters and // setters and other features. The default is 6. ecmaVersion: 6, I'll open a pull request against acorn for this.
(In reply to Olivier Thomann from comment #3) > The exponentiation operator support is on line 2648 in acorn.js. Line 1281 > doesn't mention 7 for the "supported" values. This should probably be > adjusted. > > var defaultOptions = { > // `ecmaVersion` indicates the ECMAScript version to parse. Must > // be either 3, or 5, or 6. This influences support for strict > // mode, the set of reserved words, support for getters and > // setters and other features. The default is 6. > ecmaVersion: 6, > > I'll open a pull request against acorn for this. We can open a similar pull request to Tern to add an ecma7 definition. All it will contain is Array.prototype.includes. I've already written a possible implementation.
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=7a2de7e7caf3b7ad92a9ca322807de0c94e5cc00 Fixed in master