esprima

ECMAScript parsing infrastructure for multipurpose analysis

Github星跟蹤圖

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.

主要指標

概覽
名稱與所有者jquery/esprima
主編程語言TypeScript
編程語言JavaScript (語言數: 2)
平台
許可證BSD 2-Clause "Simplified" License
所有者活动
創建於2011-11-23 05:36:43
推送於2023-04-16 01:17:08
最后一次提交
發布數32
最新版本名稱4.0.1 (發布於 2018-06-16 07:37:49)
第一版名稱1.0.0 (發布於 2012-10-22 05:17:08)
用户参与
星數7.1k
關注者數146
派生數777
提交數1.2k
已啟用問題?
問題數659
打開的問題數138
拉請求數104
打開的拉請求數10
關閉的拉請求數667
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?