commit | 4e288b7ad4004e704a6abc30306653525d5b61a9 | [log] [tgz] |
---|---|---|
author | Ariya Hidayat <ariya.hidayat@gmail.com> | Sat Apr 29 08:25:09 2017 -0700 |
committer | Ariya Hidayat <ariya.hidayat@gmail.com> | Sat Apr 29 19:23:46 2017 -0700 |
tree | 1e9fc437e78e0aef94a5c43e6c0ded34d3d94d11 | |
parent | ea90f4a93c0f8bfb19c1f101bf19c1ea97a52e6a [diff] |
Update TypeScript-related dependencies Closes gh-1827
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' }
For more information, please read the complete documentation.