esprima 0,1,5,2,4,0,11,2 editorconfig travis-ci circleci npm webpack

ECMAScript parsing infrastructure for multipurpose analysis

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' }

For more information, please read the complete documentation.

Related Repositories

esprima

esprima

ECMAScript parsing infrastructure for multipurpose analysis ...

espree

espree

An Esprima-compatible JavaScript parser ...

ast-types

ast-types

Esprima-compatible implementation of the Mozilla JS Parser API ...

esprima

esprima

ECMAScript parsing infrastructure for multipurpose analysis ...

esprima-dotnet

esprima-dotnet

Esprima .NET (BSD license) is a .NET port of the esprima.org project. It is a standard-compliant ECMAScript parser (also popularly known as JavaScript). ...


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

-   3.0.0 zip tar
-   2.7.3 zip tar
-   2.7.2 zip tar
-   2.7.1 zip tar
-   2.7.0 zip tar
-   2.6.0 zip tar
-   2.5.0 zip tar
-   2.4.1 zip tar
-   2.4.0 zip tar
-   2.3.0 zip tar
-   2.2.0 zip tar
-   2.1.0 zip tar
-   2.0.0 zip tar
-   1.2.5 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