commit | 26833ed7630da7e087d6ee1ead40f9af4bb0a58d | [log] [tgz] |
---|---|---|
author | Ariya Hidayat <ariya.hidayat@gmail.com> | Tue Dec 13 21:01:23 2016 -0800 |
committer | Ariya Hidayat <ariya.hidayat@gmail.com> | Wed Dec 14 05:29:51 2016 -0800 |
tree | 4d4a429ee007a5f99e6d12ff14bdbd0bca08b26c | |
parent | 9e288fca6a1cfb9e736aa344b1f6d739b4c240e6 [diff] |
Ensure that all *.js files are using LF as the line ending Fix #1604 Closes gh-1670
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' }