commit | a9f845b27ffe726f8d60cf501481217a231bfdcc | [log] [tgz] |
---|---|---|
author | Ariya Hidayat <ariya.hidayat@gmail.com> | Thu Mar 23 07:31:21 2017 -0700 |
committer | Ariya Hidayat <ariya.hidayat@gmail.com> | Fri Mar 24 07:25:25 2017 -0700 |
tree | ae2c0e3d1a480499c9605f8d00e44fb1f8133f3b | |
parent | 60d42ef02882b3680b0348def4be5c32ecfa5b29 [diff] |
Fix the documentation for the AST of ForStatement Fix #1777 Closes gh-1788
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.