esprima 0,0 eslint travis-ci Bower npm

ECMAScript parsing infrastructure for multipurpose analysis

2 years after

NPM version npm download Build Status Coverage Status

Esprima (esprima.org, BSD license) is a high performance, standard-compliant ECMAScript parser written in ECMAScript (also popularly known as JavaScript). Esprima is created and maintained by Ariya Hidayat, with the help of many contributors.

Features

API

Esprima can be used to perform lexical analysis (tokenization) or syntactic analysis (parsing) of a JavaScript program.

A simple example on Node.js REPL:

> var esprima = require('esprima');
> var program = 'const answer = 42';

> esprima.tokenize(program);
[ { type: 'Keyword', value: 'const' },
  { type: 'Identifier', value: 'answer' },
  { type: 'Punctuator', value: '=' },
  { type: 'Numeric', value: '42' } ]

> esprima.parse(program);
{ type: 'Program',
  body:
   [ { type: 'VariableDeclaration',
       declarations: [Object],
       kind: 'const' } ],
  sourceType: 'script' }

Related Repositories

espree

espree

An Esprima-compatible JavaScript parser ...

esprima-dotnet

esprima-dotnet

Esprima .NET (BSD license) is a .NET port of the esprima.org project. It is a st ...

esprima-ast-utils

esprima-ast-utils

Utility library to manipulate, transform, query and debug esprima ASTs. ...

esprima-cpp

esprima-cpp

JavaScript parser in C++ (port of Esprima) ...

acorn-to-esprima

acorn-to-esprima

Converts acorn tokens to esprima tokens ...


Top Contributors

ariya Constellation ikarienator michaelficarra mathiasbynens jasonLaster Swatinem mikesherov mrennie-otc jifeon jryans mariusschulz oxyc kondi pgilad demoneaux btmills eventualbuddha caridy XeCycle cvrebert cliffano dvdotsenko ef4 benjamn ide ohjames jeffmo keeyip squarooticus

Dependencies

package version
dev codecov.io ~0.1.6
escomplex-js 1.2.0
everything.js ~1.0.3
glob ~7.1.0
istanbul ~0.4.0
json-diff ~0.3.1
karma ~1.3.0
karma-chrome-launcher ~2.0.0
karma-detect-browsers ~2.2.3
karma-edge-launcher ~0.2.0
karma-firefox-launcher ~1.0.0
karma-ie-launcher ~1.0.0
karma-mocha ~1.3.0
karma-safari-launcher ~1.0.0
karma-safaritechpreview-launcher ~0.0.4
karma-sauce-launcher ~1.1.0
lodash ~3.10.1
mocha ~3.2.0
node-tick-processor ~0.0.2
regenerate ~1.3.2
temp ~0.8.3
tslint ~5.1.0
typescript ~2.3.2
typescript-formatter ~5.1.3
unicode-8.0.0 ~0.7.0
webpack ~1.14.0

Releases

-   2.0.0 zip tar
-   1.2.4 zip tar
-   1.2.3 zip tar
-   1.2.2 zip tar
-   1.2.1 zip tar
-   1.2.0 zip tar
-   1.1.1 zip tar
-   1.1.0 zip tar
-   1.0.4 zip tar
-   1.0.3 zip tar
-   1.0.2 zip tar
-   1.0.1 zip tar
-   1.0.0 zip tar