commit | 1bfd79c32fd0abe5b230253bff414a81ec034d74 | [log] [tgz] |
---|---|---|
author | Ariya Hidayat <ariya.hidayat@gmail.com> | Tue May 29 09:30:54 2018 -0700 |
committer | Ariya Hidayat <ariya.hidayat@gmail.com> | Wed May 30 18:47:31 2018 -0700 |
tree | dd7f82cba590ba37ed8ce6a681276fe629953900 | |
parent | 30602bbdfc355a6a833b985cb163cea477a2975e [diff] |
Documentation: explicit notice on supporting only JavaScript Fixes #1922 Closes gh-1933
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.
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.