commit | 723c6e8bc18b156e08e39653830fc32ea84f2d40 | [log] [tgz] |
---|---|---|
author | Timofey Kachalov <sanex3339@users.noreply.github.com> | Sun Jan 29 13:20:22 2017 +0300 |
committer | Ariya Hidayat <ariya.hidayat@gmail.com> | Mon Jan 30 04:59:40 2017 -0800 |
tree | 1747f0d41d1990c095c8ec86672310cc07fd7bf1 | |
parent | 76917e47be493e578f2b889d7e4c6a89bb9480b4 [diff] |
Fixed wrong source type in the documentation Fix #1738 Closes gh-1739
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.parse(program); { type: 'Program', body: [ { type: 'VariableDeclaration', declarations: [Object], kind: 'const' } ], sourceType: 'script' }