Skip to content

Tern & ECMAScript5 support

angelozerr edited this page Aug 3, 2015 · 7 revisions

tern provides a support for ES5 with ecma5.json. It uses acorn parser which is able to parse ES5 JavaScript code.

After installing and converting your project as Tern Project (see Tern-Eclipse-IDE), open Project Properties, click on Tern / Modules item and select the ECMAScript module and 5 version:

Select ECMAScript Module

Array

ECMAScript 5 gives the capability to provide completion for Array :

ECMAScript Completion Array

In this sample, arr is an Array of number, the completion for elt item provides Number methods :

ECMAScript Completion ForEach Array

Clone this wiki locally