| Summary: | [es7] Support all ECMA2016 changes in the tooling | ||
|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Curtis Windatt <curtis.windatt.public> |
| Component: | JS Tools | Assignee: | Curtis Windatt <curtis.windatt.public> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Michael_Rennie, Olivier_Thomann |
| Version: | 12.0 | ||
| Target Milestone: | 13.0 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Curtis Windatt
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. |