UNPKG

2.28 kBMarkdownView Raw
1**Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance,
2standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm)
3parser written in ECMAScript (also popularly known as
4[JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript)).
5Esprima is created and maintained by [Ariya Hidayat](http://twitter.com/ariyahidayat),
6with the help of [many contributors](https://github.com/ariya/esprima/contributors).
7
8**Esprima-FB** is a fork of the [Harmony branch](https://github.com/ariya/esprima/tree/harmony) of Esprima that implements [JSX specification](https://github.com/facebook/jsx) on top of ECMAScript syntax.
9
10### Features
11
12- Full support for ECMAScript 5.1 ([ECMA-262](http://www.ecma-international.org/publications/standards/Ecma-262.htm))
13- Experimental support for ES6/Harmony (module, class, destructuring, ...)
14- Full support for [JSX syntax extensions](https://github.com/facebook/jsx).
15- Sensible [syntax tree format](https://github.com/facebook/jsx/blob/master/AST.md) compatible with Mozilla
16[Parser AST](https://developer.mozilla.org/en/SpiderMonkey/Parser_API)
17- Optional tracking of syntax node location (index-based and line-column)
18- Heavily tested (> 650 [unit tests](http://esprima.org/test/) with [full code coverage](http://esprima.org/test/coverage.html))
19- Ongoing support for ES6/Harmony (module, class, destructuring, ...)
20
21### Versioning rules
22
23In order to follow semver rules and keep reference to original Esprima versions at the same time, we left 3 digits of each version part to refer to upstream harmony branch. We then take the most significant digit.
24
25**Example:** 4001.3001.0000-dev-harmony-fb aligns with 1.1.0-dev-harmony (aka 001.001.000-dev-harmony) in upstream, with our own changes on top.
26
27Esprima-FB serves as a **building block** for JSX language tools and transpiler implementations (such as [React](https://github.com/facebook/react) or [JSXDOM](https://github.com/vjeux/jsxdom)).
28
29Esprima-FB runs on many popular web browsers, as well as other ECMAScript platforms such as
30[Rhino](http://www.mozilla.org/rhino) and [Node.js](https://npmjs.org/package/esprima).
31
32For more information on original Esprima, check the web site [esprima.org](http://esprima.org).