jquery/esprima


ECMAScript parsing infrastructure for multipurpose analysis

http://esprima.org

License: BSD-2-Clause

Language: TypeScript

Keywords: ast, ecmascript, esprima, javascript, parser, parsing


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.parseScript(program);
{ type: 'Program',
  body:
   [ { type: 'VariableDeclaration',
       declarations: [Object],
       kind: 'const' } ],
  sourceType: 'script' }

For more information, please read the complete documentation.

Project Statistics

Sourcerank 20
Repository Size 50.9 MB
Stars 5,165
Forks 663
Watchers 156
Open issues 94
Dependencies 32
Contributors 60
Tags 32
Created
Last updated
Last pushed

Top Contributors See all

Ariya Hidayat Yusuke Suzuki Bei Zhang - Ikarienator Joost-Wim Boekesteijn Mathias Bynens Michael Ficarra Jason Laster Arpad Borsos Mike Sherov mrennie-otc Michael Rennie Wenlu Wang jugglinmike Andrew Balakirev Pusztai Tibor fisher Oskar Schöldström J. Ryan Stinnett Marius Schulz Chris Rebert

Packages Referencing this Repo

esprima
ECMAScript parsing infrastructure for multipurpose analysis
Latest release 4.0.1 - Updated - 5.17K stars
esprima-couch-chakra
couch-chakra specific fork of the esprima project. Allows anonymous functions on global scope.
Latest release 4.0.0-dev-1 - Published - 5.17K stars
esprima-tot
Esprima fork that supports the tot syntax
Latest release 2.2.0 - Published - 5.17K stars
@publica/esprima
ECMAScript parsing infrastructure for multipurpose analysis
Latest release 3.5.0 - Updated - 5.17K stars
org.webjars.npm:esprima
WebJar for esprima
Latest release 4.0.1 - Updated - 5.17K stars

Recent Tags See all

4.0.1 June 16, 2018
4.0.0 June 10, 2017
3.1.3 December 23, 2016
3.1.2 November 24, 2016
3.1.1 November 01, 2016
3.1.0 October 09, 2016
3.0.0 September 03, 2016
2.7.3 August 24, 2016
2.7.2 February 03, 2016
2.7.1 December 10, 2015
2.7.0 October 22, 2015
2.6.0 September 01, 2015
2.5.0 August 01, 2015
2.4.1 July 01, 2015
2.4.0 June 26, 2015

Interesting Forks See all

ariya/esprima
ECMAScript parsing infrastructure for multipurpose analysis
TypeScript - BSD-2-Clause - Last pushed - 294 stars - 27 forks
facebookarchive/esprima
ECMAScript parsing infrastructure for multipurpose analysis
JavaScript - BSD-2-Clause - Last pushed - 126 stars - 54 forks
Diullei/esprima-typeScript
TypeScript parsing infrastructure for multipurpose analysis. Made over Esprima.js
JavaScript - BSD-2-Clause - Last pushed - 13 stars - 3 forks
tj/esprima
ECMAScript parsing infrastructure for multipurpose analysis
JavaScript - BSD-2-Clause - Last pushed - 2 stars
Nexenta/esprima
ECMAScript parsing infrastructure for multipurpose analysis
JavaScript - BSD-2-Clause - Last pushed - 1 stars

Something wrong with this page? Make a suggestion

Last synced: 2018-07-15 17:59:54 UTC

Login to resync this repository