🌐
Esprima
esprima.org
Esprima
> 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.
Online Parsing
Parser produces the (beautiful) syntax tree · // Life, Universe, and Everything var answer = 6 * 7; · Ready · Syntax · Tokens · URL for this code:
Minifiy & Obfuscate
Shorten variable names Remove unreachable branches Remove unused variable definitions Fold (literal) constants Eliminate dead code · Minification reduces the size of the code without affecting its execution. Further compression is achieved by compacting the syntax tree, shortening variable ...
Source Rewrite
Indent with: tab 2 spaces 4 spaces · String literal quotes: single (') double (") automatic
Syntax Validator
Unlike a typical code linter, this syntax validator does not care about coding styles and formatting · If there is a syntax error, place the mouse cursor over the squiggly red line to reveal the detailed error description
🌐
Esprima
esprima.org › doc
Esprima Documentation
The documentation is available in the following formats:
🌐
Esprima
docs.esprima.org › en › latest › getting-started.html
Chapter 1. Getting Started — Esprima master documentation
Esprima is a tool to perform lexical and syntactical analysis of JavaScript programs.
🌐
Esprima
docs.esprima.org › en › latest › syntactic-analysis.html
Chapter 2. Syntactic Analysis (Parsing) — Esprima master documentation
Esprima parser takes a string representing a valid JavaScript program and produces a syntax tree, an ordered tree that describes the syntactic structure of the program.
🌐
Esprima
docs.esprima.org › en › latest
Esprima — Esprima master documentation
Using Node.js to play with Esprima · Using Esprima in a web browser · Using Esprima with Rhino or Nashorn · Chapter 2. Syntactic Analysis (Parsing) Distinguishing a Script and a Module · JSX Syntax Support · Browser Compatibility · Tolerant Mode · Regular Expression Literals ·
🌐
GitHub
github.com › jquery › esprima
GitHub - jquery/esprima: ECMAScript parsing infrastructure for multipurpose analysis · GitHub
> 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.
Starred by 7.1K users
Forked by 774 users
Languages   TypeScript 70.7% | JavaScript 29.3%
🌐
Esprima
docs.esprima.org › en › 3.1
Esprima — Esprima 3.1 documentation
Using Node.js to play with Esprima · Using Esprima in a web browser · Using Esprima with Rhino or Nashorn · Chapter 2. Syntactic Analysis (Parsing) Distinguishing a Script and a Module · JSX Syntax Support · Browser Compatibility · Tolerant Mode · Node Location ·
🌐
Esprima
docs.esprima.org › en › latest › syntax-tree-format.html
Appendix A. Syntax Tree Format — Esprima master documentation
Esprima syntax tree format is derived from the original version of Mozilla Parser API, which is then formalized and expanded as the ESTree specification.
🌐
Esprima
esprima.org › demo › parse.html
Esprima: Parser
Parser produces the (beautiful) syntax tree · // Life, Universe, and Everything var answer = 6 * 7; · Ready · Syntax · Tokens · URL for this code:
🌐
npm
npmjs.com › package › esprima
esprima - npm
July 13, 2018 - ECMAScript parsing infrastructure for multipurpose analysis. Latest version: 4.0.1, last published: 8 years ago. Start using esprima in your project by running `npm i esprima`. There are 3640 other projects in the npm registry using esprima.
      » npm install esprima
    
Published   Jul 13, 2018
Version   4.0.1
Author   Ariya Hidayat
Homepage   http://esprima.org
Find elsewhere
🌐
Mtri
geodjango.mtri.org › static › leaflet › 0.5.1 › node_modules › jshint › node_modules › esprima › doc › index.html
Esprima Documentation
The script detectnestedternary.js in the examples/ subdirectory is using Esprima to look for a ternary conditional, i.e. operator ?:, which is immediately followed (in one of its code paths) by another ternary conditional.
🌐
Esprima
docs.esprima.org › _ › downloads › en › stable › epub epub
Esprima
Using Node.js to play with Esprima · Using Esprima in a web browser · Using Esprima with Rhino or Nashorn · Chapter 2. Syntactic Analysis (Parsing) Distinguishing a Script and a Module · JSX Syntax Support · Browser Compatibility · Tolerant Mode · Regular Expression Literals ·
🌐
PyPI
pypi.org › project › esprima
esprima · PyPI
Details for the file esprima-4.0.1.tar.gz.
      » pip install esprima
    
Published   Aug 24, 2018
Version   4.0.1
🌐
Esprima
docs.esprima.org › _ › downloads › en › latest › epub epub
Esprima master documentation
Esprima is a tool to perform lexical and syntactical analysis of JavaScript programs. Esprima itself is also written in JavaScript.
🌐
Npmdoc
npmdoc.github.io › node-npmdoc-esprima › build › apidoc.html
function esprima.parse (code, options, delegate)
api documentation for esprima (v3.1.3) · ECMAScript parsing infrastructure for multipurpose analysis · table of contents · module esprima · function esprima.parse (code, options, delegate) · function esprima.tokenize (code, options, delegate) · object esprima.Syntax · string esprima.version
🌐
RDocumentation
rdocumentation.org › packages › js › versions › 1.2 › topics › esprima
esprima function - RDocumentation
The esprima_tokenize function returns a data frame with JavaScript tokens. The esprima_parse function returns the Syntax Tree in JSON format. This can be parsed to R using e.g.