esprima-4.0.1/000077500000000000000000000000001331122015500131455ustar00rootroot00000000000000esprima-4.0.1/.circleci/000077500000000000000000000000001331122015500150005ustar00rootroot00000000000000esprima-4.0.1/.circleci/config.yml000066400000000000000000000010311331122015500167630ustar00rootroot00000000000000version: 2 jobs: build: working_directory: ~/working_directory docker: - image: node:6 environment: NO_WATCH_TESTS: 1 steps: - checkout - run: node --version - run: npm --version - restore_cache: key: v1-npm-dependencies-{{ .Branch }}-{{ checksum "package.json" }} - run: npm install - save_cache: key: v1-npm-dependencies-{{ .Branch }}-{{ checksum "package.json" }} paths: - ./node_modules - run: npm run circleci esprima-4.0.1/.editorconfig000066400000000000000000000002231331122015500156170ustar00rootroot00000000000000root = true [*] charset = utf-8 indent_style = space indent_size = 4 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true esprima-4.0.1/.github/000077500000000000000000000000001331122015500145055ustar00rootroot00000000000000esprima-4.0.1/.github/ISSUE_TEMPLATE.md000066400000000000000000000021651331122015500172160ustar00rootroot00000000000000 ### Steps to reproduce ```js esprima.parse('some code') ``` ### Expected output ### Actual output ### Relevant references esprima-4.0.1/.gitignore000066400000000000000000000000711331122015500151330ustar00rootroot00000000000000coverage node_modules test/dist src/*.js dist/esprima.js esprima-4.0.1/.npmignore000066400000000000000000000001121331122015500151360ustar00rootroot00000000000000.git .travis.yml /node_modules/ /assets/ /coverage/ /demo/ /tools/ /test/ esprima-4.0.1/.travis.yml000066400000000000000000000001431331122015500152540ustar00rootroot00000000000000sudo: false language: node_js script: "npm run travis" node_js: - "4" - "6" - "8" - "node" esprima-4.0.1/CONTRIBUTING.md000066400000000000000000000016561331122015500154060ustar00rootroot00000000000000# Contribution Guide This page describes how to contribute changes to Esprima. Please do **not** create a pull request without reading this guide first. Failure to do so may result in the **rejection** of the pull request. **1. Create a ticket in the [issue tracker](https://github.com/jquery/esprima/issues)**. This serves as a placeholder for important feedback, review, or any future updates. **2. Run all the tests**. This requires Node.js: `npm install` to set up, `npm test` to run the tests. **3. Work on a feature branch**. If the change still needs some tweaks, it will not clutter the master branch. **4. Write a reasonable commit message:** * Keep the first line < 72 characters. Write additional paragraphs if necessary. * Put the link to the ticket. This is important for cross-referencing purposes. For more information, please check the [detailed contribution guide](http://esprima.org/doc/index.html#contribution). esprima-4.0.1/ChangeLog000066400000000000000000000232711331122015500147240ustar00rootroot000000000000002018-06-17: Version 4.0.1 * Fix parsing async get/set in a class (issue 1861, 1875) * Account for different return statement argument (issue 1829, 1897, 1928) * Correct the handling of HTML comment when parsing a module (issue 1841) * Fix incorrect parse async with proto-identifier-shorthand (issue 1847) * Fix negative column in binary expression (issue 1844) * Fix incorrect YieldExpression in object methods (issue 1834) * Various documentation fixes 2017-06-10: Version 4.0.0 * Support ES2017 async function and await expression (issue 1079) * Support ES2017 trailing commas in function parameters (issue 1550) * Explicitly distinguish parsing a module vs a script (issue 1576) * Fix JSX non-empty container (issue 1786) * Allow JSX element in a yield expression (issue 1765) * Allow `in` expression in a concise body with a function body (issue 1793) * Setter function argument must not be a rest parameter (issue 1693) * Limit strict mode directive to functions with a simple parameter list (issue 1677) * Prohibit any escape sequence in a reserved word (issue 1612) * Only permit hex digits in hex escape sequence (issue 1619) * Prohibit labelled class/generator/function declaration (issue 1484) * Limit function declaration as if statement clause only in non-strict mode (issue 1657) * Tolerate missing ) in a with and do-while statement (issue 1481) 2016-12-22: Version 3.1.3 * Support binding patterns as rest element (issue 1681) * Account for different possible arguments of a yield expression (issue 1469) 2016-11-24: Version 3.1.2 * Ensure that import specifier is more restrictive (issue 1615) * Fix duplicated JSX tokens (issue 1613) * Scan template literal in a JSX expression container (issue 1622) * Improve XHTML entity scanning in JSX (issue 1629) 2016-10-31: Version 3.1.1 * Fix assignment expression problem in an export declaration (issue 1596) * Fix incorrect tokenization of hex digits (issue 1605) 2016-10-09: Version 3.1.0 * Do not implicitly collect comments when comment attachment is specified (issue 1553) * Fix incorrect handling of duplicated proto shorthand fields (issue 1485) * Prohibit initialization in some variants of for statements (issue 1309, 1561) * Fix incorrect parsing of export specifier (issue 1578) * Fix ESTree compatibility for assignment pattern (issue 1575) 2016-09-03: Version 3.0.0 * Support ES2016 exponentiation expression (issue 1490) * Support JSX syntax (issue 1467) * Use the latest Unicode 8.0 (issue 1475) * Add the support for syntax node delegate (issue 1435) * Fix ESTree compatibility on meta property (issue 1338) * Fix ESTree compatibility on default parameter value (issue 1081) * Fix ESTree compatibility on try handler (issue 1030) 2016-08-23: Version 2.7.3 * Fix tokenizer confusion with a comment (issue 1493, 1516) 2016-02-02: Version 2.7.2 * Fix out-of-bound error location in an invalid string literal (issue 1457) * Fix shorthand object destructuring defaults in variable declarations (issue 1459) 2015-12-10: Version 2.7.1 * Do not allow trailing comma in a variable declaration (issue 1360) * Fix assignment to `let` in non-strict mode (issue 1376) * Fix missing delegate property in YieldExpression (issue 1407) 2015-10-22: Version 2.7.0 * Fix the handling of semicolon in a break statement (issue 1044) * Run the test suite with major web browsers (issue 1259, 1317) * Allow `let` as an identifier in non-strict mode (issue 1289) * Attach orphaned comments as `innerComments` (issue 1328) * Add the support for token delegator (issue 1332) 2015-09-01: Version 2.6.0 * Properly allow or prohibit `let` in a binding identifier/pattern (issue 1048, 1098) * Add sourceType field for Program node (issue 1159) * Ensure that strict mode reserved word binding throw an error (issue 1171) * Run the test suite with Node.js and IE 11 on Windows (issue 1294) * Allow binding pattern with no initializer in a for statement (issue 1301) 2015-07-31: Version 2.5.0 * Run the test suite in a browser environment (issue 1004) * Ensure a comma between imported default binding and named imports (issue 1046) * Distinguish `yield` as a keyword vs an identifier (issue 1186) * Support ES6 meta property `new.target` (issue 1203) * Fix the syntax node for yield with expression (issue 1223) * Fix the check of duplicated proto in property names (issue 1225) * Fix ES6 Unicode escape in identifier name (issue 1229) * Support ES6 IdentifierStart and IdentifierPart (issue 1232) * Treat await as a reserved word when parsing as a module (issue 1234) * Recognize identifier characters from Unicode SMP (issue 1244) * Ensure that export and import can be followed by a comma (issue 1250) * Fix yield operator precedence (issue 1262) 2015-07-01: Version 2.4.1 * Fix some cases of comment attachment (issue 1071, 1175) * Fix the handling of destructuring in function arguments (issue 1193) * Fix invalid ranges in assignment expression (issue 1201) 2015-06-26: Version 2.4.0 * Support ES6 for-of iteration (issue 1047) * Support ES6 spread arguments (issue 1169) * Minimize npm payload (issue 1191) 2015-06-16: Version 2.3.0 * Support ES6 generator (issue 1033) * Improve parsing of regular expressions with `u` flag (issue 1179) 2015-04-17: Version 2.2.0 * Support ES6 import and export declarations (issue 1000) * Fix line terminator before arrow not recognized as error (issue 1009) * Support ES6 destructuring (issue 1045) * Support ES6 template literal (issue 1074) * Fix the handling of invalid/incomplete string escape sequences (issue 1106) * Fix ES3 static member access restriction (issue 1120) * Support for `super` in ES6 class (issue 1147) 2015-03-09: Version 2.1.0 * Support ES6 class (issue 1001) * Support ES6 rest parameter (issue 1011) * Expand the location of property getter, setter, and methods (issue 1029) * Enable TryStatement transition to a single handler (issue 1031) * Support ES6 computed property name (issue 1037) * Tolerate unclosed block comment (issue 1041) * Support ES6 lexical declaration (issue 1065) 2015-02-06: Version 2.0.0 * Support ES6 arrow function (issue 517) * Support ES6 Unicode code point escape (issue 521) * Improve the speed and accuracy of comment attachment (issue 522) * Support ES6 default parameter (issue 519) * Support ES6 regular expression flags (issue 557) * Fix scanning of implicit octal literals (issue 565) * Fix the handling of automatic semicolon insertion (issue 574) * Support ES6 method definition (issue 620) * Support ES6 octal integer literal (issue 621) * Support ES6 binary integer literal (issue 622) * Support ES6 object literal property value shorthand (issue 624) 2015-03-03: Version 1.2.5 * Fix scanning of implicit octal literals (issue 565) 2015-02-05: Version 1.2.4 * Fix parsing of LeftHandSideExpression in ForInStatement (issue 560) * Fix the handling of automatic semicolon insertion (issue 574) 2015-01-18: Version 1.2.3 * Fix division by this (issue 616) 2014-05-18: Version 1.2.2 * Fix duplicated tokens when collecting comments (issue 537) 2014-05-04: Version 1.2.1 * Ensure that Program node may still have leading comments (issue 536) 2014-04-29: Version 1.2.0 * Fix semicolon handling for expression statement (issue 462, 533) * Disallow escaped characters in regular expression flags (issue 503) * Performance improvement for location tracking (issue 520) * Improve the speed of comment attachment (issue 522) 2014-03-26: Version 1.1.1 * Fix token handling of forward slash after an array literal (issue 512) 2014-03-23: Version 1.1.0 * Optionally attach comments to the owning syntax nodes (issue 197) * Simplify binary parsing with stack-based shift reduce (issue 352) * Always include the raw source of literals (issue 376) * Add optional input source information (issue 386) * Tokenizer API for pure lexical scanning (issue 398) * Improve the web site and its online demos (issue 337, 400, 404) * Performance improvement for location tracking (issue 417, 424) * Support HTML comment syntax (issue 451) * Drop support for legacy browsers (issue 474) 2013-08-27: Version 1.0.4 * Minimize the payload for packages (issue 362) * Fix missing cases on an empty switch statement (issue 436) * Support escaped ] in regexp literal character classes (issue 442) * Tolerate invalid left-hand side expression (issue 130) 2013-05-17: Version 1.0.3 * Variable declaration needs at least one declarator (issue 391) * Fix benchmark's variance unit conversion (issue 397) * IE < 9: \v should be treated as vertical tab (issue 405) * Unary expressions should always have prefix: true (issue 418) * Catch clause should only accept an identifier (issue 423) * Tolerate setters without parameter (issue 426) 2012-11-02: Version 1.0.2 Improvement: * Fix esvalidate JUnit output upon a syntax error (issue 374) 2012-10-28: Version 1.0.1 Improvements: * esvalidate understands shebang in a Unix shell script (issue 361) * esvalidate treats fatal parsing failure as an error (issue 361) * Reduce Node.js package via .npmignore (issue 362) 2012-10-22: Version 1.0.0 Initial release. esprima-4.0.1/LICENSE.BSD000066400000000000000000000024271331122015500145660ustar00rootroot00000000000000Copyright JS Foundation and other contributors, https://js.foundation/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. esprima-4.0.1/README.md000066400000000000000000000045731331122015500144350ustar00rootroot00000000000000[![NPM version](https://img.shields.io/npm/v/esprima.svg)](https://www.npmjs.com/package/esprima) [![npm download](https://img.shields.io/npm/dm/esprima.svg)](https://www.npmjs.com/package/esprima) [![Build Status](https://img.shields.io/travis/jquery/esprima/master.svg)](https://travis-ci.org/jquery/esprima) [![Coverage Status](https://img.shields.io/codecov/c/github/jquery/esprima/master.svg)](https://codecov.io/github/jquery/esprima) **Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance, standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) parser written in ECMAScript (also popularly known as [JavaScript](https://en.wikipedia.org/wiki/JavaScript)). Esprima is created and maintained by [Ariya Hidayat](https://twitter.com/ariyahidayat), with the help of [many contributors](https://github.com/jquery/esprima/contributors). ### Features - Full support for ECMAScript 2017 ([ECMA-262 8th Edition](http://www.ecma-international.org/publications/standards/Ecma-262.htm)) - Sensible [syntax tree format](https://github.com/estree/estree/blob/master/es5.md) as standardized by [ESTree project](https://github.com/estree/estree) - Experimental support for [JSX](https://facebook.github.io/jsx/), a syntax extension for [React](https://facebook.github.io/react/) - Optional tracking of syntax node location (index-based and line-column) - [Heavily tested](http://esprima.org/test/ci.html) (~1500 [unit tests](https://github.com/jquery/esprima/tree/master/test/fixtures) with [full code coverage](https://codecov.io/github/jquery/esprima)) ### API Esprima can be used to perform [lexical analysis](https://en.wikipedia.org/wiki/Lexical_analysis) (tokenization) or [syntactic analysis](https://en.wikipedia.org/wiki/Parsing) (parsing) of a JavaScript program. A simple example on Node.js REPL: ```javascript > 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](http://esprima.org/doc).esprima-4.0.1/appveyor.yml000066400000000000000000000005641331122015500155420ustar00rootroot00000000000000version: "{build}" environment: nodejs_version: "8" matrix: fast_finish: true install: - choco install firefox - choco install chromium - ps: Install-Product node $env:nodejs_version - node --version - npm --version - npm install test_script: - set CHROME_BIN="C:\Program Files (x86)\Chromium\Application\chrome.exe" - npm run appveyor build: off esprima-4.0.1/bin/000077500000000000000000000000001331122015500137155ustar00rootroot00000000000000esprima-4.0.1/bin/esparse.js000077500000000000000000000115241331122015500157230ustar00rootroot00000000000000#!/usr/bin/env node /* Copyright JS Foundation and other contributors, https://js.foundation/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*jslint sloppy:true node:true rhino:true */ var fs, esprima, fname, forceFile, content, options, syntax; if (typeof require === 'function') { fs = require('fs'); try { esprima = require('esprima'); } catch (e) { esprima = require('../'); } } else if (typeof load === 'function') { try { load('esprima.js'); } catch (e) { load('../esprima.js'); } } // Shims to Node.js objects when running under Rhino. if (typeof console === 'undefined' && typeof process === 'undefined') { console = { log: print }; fs = { readFileSync: readFile }; process = { argv: arguments, exit: quit }; process.argv.unshift('esparse.js'); process.argv.unshift('rhino'); } function showUsage() { console.log('Usage:'); console.log(' esparse [options] [file.js]'); console.log(); console.log('Available options:'); console.log(); console.log(' --comment Gather all line and block comments in an array'); console.log(' --loc Include line-column location info for each syntax node'); console.log(' --range Include index-based range for each syntax node'); console.log(' --raw Display the raw value of literals'); console.log(' --tokens List all tokens in an array'); console.log(' --tolerant Tolerate errors on a best-effort basis (experimental)'); console.log(' -v, --version Shows program version'); console.log(); process.exit(1); } options = {}; process.argv.splice(2).forEach(function (entry) { if (forceFile || entry === '-' || entry.slice(0, 1) !== '-') { if (typeof fname === 'string') { console.log('Error: more than one input file.'); process.exit(1); } else { fname = entry; } } else if (entry === '-h' || entry === '--help') { showUsage(); } else if (entry === '-v' || entry === '--version') { console.log('ECMAScript Parser (using Esprima version', esprima.version, ')'); console.log(); process.exit(0); } else if (entry === '--comment') { options.comment = true; } else if (entry === '--loc') { options.loc = true; } else if (entry === '--range') { options.range = true; } else if (entry === '--raw') { options.raw = true; } else if (entry === '--tokens') { options.tokens = true; } else if (entry === '--tolerant') { options.tolerant = true; } else if (entry === '--') { forceFile = true; } else { console.log('Error: unknown option ' + entry + '.'); process.exit(1); } }); // Special handling for regular expression literal since we need to // convert it to a string literal, otherwise it will be decoded // as object "{}" and the regular expression would be lost. function adjustRegexLiteral(key, value) { if (key === 'value' && value instanceof RegExp) { value = value.toString(); } return value; } function run(content) { syntax = esprima.parse(content, options); console.log(JSON.stringify(syntax, adjustRegexLiteral, 4)); } try { if (fname && (fname !== '-' || forceFile)) { run(fs.readFileSync(fname, 'utf-8')); } else { var content = ''; process.stdin.resume(); process.stdin.on('data', function(chunk) { content += chunk; }); process.stdin.on('end', function() { run(content); }); } } catch (e) { console.log('Error: ' + e.message); process.exit(1); } esprima-4.0.1/bin/esvalidate.js000077500000000000000000000171001331122015500163760ustar00rootroot00000000000000#!/usr/bin/env node /* Copyright JS Foundation and other contributors, https://js.foundation/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*jslint sloppy:true plusplus:true node:true rhino:true */ /*global phantom:true */ var fs, system, esprima, options, fnames, forceFile, count; if (typeof esprima === 'undefined') { // PhantomJS can only require() relative files if (typeof phantom === 'object') { fs = require('fs'); system = require('system'); esprima = require('./esprima'); } else if (typeof require === 'function') { fs = require('fs'); try { esprima = require('esprima'); } catch (e) { esprima = require('../'); } } else if (typeof load === 'function') { try { load('esprima.js'); } catch (e) { load('../esprima.js'); } } } // Shims to Node.js objects when running under PhantomJS 1.7+. if (typeof phantom === 'object') { fs.readFileSync = fs.read; process = { argv: [].slice.call(system.args), exit: phantom.exit, on: function (evt, callback) { callback(); } }; process.argv.unshift('phantomjs'); } // Shims to Node.js objects when running under Rhino. if (typeof console === 'undefined' && typeof process === 'undefined') { console = { log: print }; fs = { readFileSync: readFile }; process = { argv: arguments, exit: quit, on: function (evt, callback) { callback(); } }; process.argv.unshift('esvalidate.js'); process.argv.unshift('rhino'); } function showUsage() { console.log('Usage:'); console.log(' esvalidate [options] [file.js...]'); console.log(); console.log('Available options:'); console.log(); console.log(' --format=type Set the report format, plain (default) or junit'); console.log(' -v, --version Print program version'); console.log(); process.exit(1); } options = { format: 'plain' }; fnames = []; process.argv.splice(2).forEach(function (entry) { if (forceFile || entry === '-' || entry.slice(0, 1) !== '-') { fnames.push(entry); } else if (entry === '-h' || entry === '--help') { showUsage(); } else if (entry === '-v' || entry === '--version') { console.log('ECMAScript Validator (using Esprima version', esprima.version, ')'); console.log(); process.exit(0); } else if (entry.slice(0, 9) === '--format=') { options.format = entry.slice(9); if (options.format !== 'plain' && options.format !== 'junit') { console.log('Error: unknown report format ' + options.format + '.'); process.exit(1); } } else if (entry === '--') { forceFile = true; } else { console.log('Error: unknown option ' + entry + '.'); process.exit(1); } }); if (fnames.length === 0) { fnames.push(''); } if (options.format === 'junit') { console.log(''); console.log(''); } count = 0; function run(fname, content) { var timestamp, syntax, name; try { if (typeof content !== 'string') { throw content; } if (content[0] === '#' && content[1] === '!') { content = '//' + content.substr(2, content.length); } timestamp = Date.now(); syntax = esprima.parse(content, { tolerant: true }); if (options.format === 'junit') { name = fname; if (name.lastIndexOf('/') >= 0) { name = name.slice(name.lastIndexOf('/') + 1); } console.log(''); syntax.errors.forEach(function (error) { var msg = error.message; msg = msg.replace(/^Line\ [0-9]*\:\ /, ''); console.log(' '); console.log(' ' + error.message + '(' + name + ':' + error.lineNumber + ')' + ''); console.log(' '); }); console.log(''); } else if (options.format === 'plain') { syntax.errors.forEach(function (error) { var msg = error.message; msg = msg.replace(/^Line\ [0-9]*\:\ /, ''); msg = fname + ':' + error.lineNumber + ': ' + msg; console.log(msg); ++count; }); } } catch (e) { ++count; if (options.format === 'junit') { console.log(''); console.log(' '); console.log(' ' + e.message + '(' + fname + ((e.lineNumber) ? ':' + e.lineNumber : '') + ')'); console.log(' '); console.log(''); } else { console.log(fname + ':' + e.lineNumber + ': ' + e.message.replace(/^Line\ [0-9]*\:\ /, '')); } } } fnames.forEach(function (fname) { var content = ''; try { if (fname && (fname !== '-' || forceFile)) { content = fs.readFileSync(fname, 'utf-8'); } else { fname = ''; process.stdin.resume(); process.stdin.on('data', function(chunk) { content += chunk; }); process.stdin.on('end', function() { run(fname, content); }); return; } } catch (e) { content = e; } run(fname, content); }); process.on('exit', function () { if (options.format === 'junit') { console.log(''); } if (count > 0) { process.exit(1); } if (count === 0 && typeof phantom === 'object') { process.exit(0); } }); esprima-4.0.1/dist/000077500000000000000000000000001331122015500141105ustar00rootroot00000000000000esprima-4.0.1/dist/.gitignore000066400000000000000000000000001331122015500160660ustar00rootroot00000000000000esprima-4.0.1/docs/000077500000000000000000000000001331122015500140755ustar00rootroot00000000000000esprima-4.0.1/docs/Makefile000066400000000000000000000156001331122015500155370ustar00rootroot00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # User-friendly check for sphinx-build ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) endif # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " xml to make Docutils-native XML files" @echo " pseudoxml to make pseudoxml-XML files for display purposes" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" @echo " coverage to run coverage check of the documentation (if enabled)" clean: rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Test.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Test.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/Test" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Test" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." latexpdfja: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through platex and dvipdfmx..." $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." coverage: $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage @echo "Testing of coverage in the sources finished, look at the " \ "results in $(BUILDDIR)/coverage/python.txt." xml: $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml @echo @echo "Build finished. The XML files are in $(BUILDDIR)/xml." pseudoxml: $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml @echo @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." esprima-4.0.1/docs/README.md000066400000000000000000000004211331122015500153510ustar00rootroot00000000000000 Unix: ```bash virtualenv env source env/bin/activate pip install -r requirements.txt cd docs make html ``` Windows: ```bash virtualenv env env\Script\activate pip install -r requirements.txt cd docs make html ``` Open the file `_build/html/index.html` in a web browser. esprima-4.0.1/docs/_static/000077500000000000000000000000001331122015500155235ustar00rootroot00000000000000esprima-4.0.1/docs/_static/custom.css000066400000000000000000000003711331122015500175500ustar00rootroot00000000000000div.section pre { padding: 7px; } div.section table { border-collapse: collapse; } div.section table, div.section th, div.section td { border: 1px solid #bbb; padding: 8px; } div.section table tr th { background-color: #eee; }esprima-4.0.1/docs/_static/esprima.png000066400000000000000000000034411331122015500176730ustar00rootroot00000000000000PNG  IHDR@C,psRGBgAMA a pHYstEXtSoftwareAdobe ImageReadyqe<IDATx^ lUvۋ%@k"b$KP4RBbL E6V@ HkCZb9 {t}=:mM5oޛ}ofT`˸^eF.&aT-X=B8ZTHFvMHW|*[H[sWBҲT,=@ $UKHYV-!dZBZj k@֪%$UKHYV-!dZBZuP`u3p8ZhhD cUVWV0d\; lh݁QL;CƂM;]pKR4qJO.@&\< Mx?W0#k=NnlFX=I QכG;".Fmw8/X,vgGXlrME,V=x&mb2#࠿.s6fS+fb1'0<EyeQ[\UӢXT^Ƅu/M-7'+B|uVx//S">&(Xv}FhԈ+imcT_M{8|h8h4`۞s,ЈvH]uI+.V SĶ6r.*ˆ@W{xd܏JEi$b# qq|[;06Ri }8)sx ʊJ*e{+&zu3Ky%'>#wgm C 14j)^ӈ=Aթ/_=kssj@γ#zD;]@4eo{13DY'C F'mwG0P \d c4*;Gȟ;2p({䵃UpQ`C9\! qO'F=n6B]$Nz5XE[N`J揢ߓ3ǑH&OwE (b%Ù'=5/{Mu/F+2G%zt!'0"935S!ZL#Ē*[nXʓ^/@ن7RN9,Yi/F^CNסhW7Pae联yhi0Z妌D="j!귘ʳ N^tqXʉ!>MG8 $E96>w3w䧑;λ Y a)[Z1铇^737Sx$Ra[kv~zB1=-U%w_Bqi׍Q_I⿋[pߜm1c1d@Q&'c3@)^EJzP!eh߹"8wuՆ#`}1mR2 8_ 6 F|QA/ (7RwôAB- !R'!3&3zሗ/_F0!R)\]]ť?^!Cd2PBH$jhZ+VLl} 7oL20b !;|^+WNly [nD„'r9"##QlY;( !O=w~6 b !C޽{&/ACX"B\tPjt[HQXBRRR JX@.n{*~ 5-Pf!!N!^?3CMR (4eCJJ%(P&^&`#y" Z=`j0c4$[#j8~v4D?yOOM֚Hq/zcm4Ⱥ A:X}1I!JV3)LL"I,pL/Ɛ{6ya{FߞwM4d]6::Zr?xμm& sYUCdge"33.;/n̄A)+Urt,xv q14*X`Il4vvJ.Zm C+˽LCxmw`ڗݼ+|YOF_!6 mq. ۹`CWR CJC*BnIkO !5b7Rf;˿Vqh2`ֶc2O\j>.9 %{ cɠ!~\@B|L|0mjc8} Z: ̷ggdbh\뉦UFh<:k,do51zY0{|L>3fIs,u4 \%0m#܊Y[#\x{Df=eǴÍIOxG<:0_]AvRghsB1cHsԘ{ĽѯWOk0$T #g>i?V 3ZXZ[:f ^Wv:]$˂X>Ş6MkzW'̟a, 3 C4l B2|.Ggk4 =]s*Dfj2\Jv,0)Zo2OӔֳmֺ`? –RhPƶ)z٨w<6V߼3An)g _C^aMEb֌={0_BVLyA'c ^qP "YϞŞšbMy2+<#28/t,.9ѹ=e VN%8: Х7CdR~0Dv=mdYس"+[gh ; ً`aeyW>Lӿ{oGL9A\N?/MJC}ӢPMر Lˏ=Q4zX0q?vZ\5C gLMM=>X^6?IerZ8[aTƨ4eD-·RQcHe; I7cO6;ŋW-L5 g ACaA( h{;ױMXZ*`bq21 _8+s"e`+gvn/]0OM4} ӻz{o:D! `~*3Q$,gʘذ~ZW.CݰqrKSL0kW/EUY,PqX20*Fa> csܹl3 S歇 gV ª3Vn\\3"дlܸ 7A (i j|awHN5+P| u><Uap5Ջ;Aw V?X - Vr>evo3be.ų;Z%6=VFk&;w%ˆŋN{9'~ӺwAҢV\ï >1A=`ӂ0dB%ˇ~W||b_0dJ.늗pEoGdeP%2,eި\$ :5{!3+JHW[~P1 O #$ʣw6n۠ lĖpy44{AR  `b,^'Cŝ&cH@vQ%#"u)u˂O6h^!/#Q넅kסR9 `a %Kל=.tK\ZB5 n^Fnz@;ȟ?v/RxxxWʿ? 䖖8: Tn a=FP8YC;(UjH-a VF-EL}-,xyy=;~FΎi)e=oi'ʡPXC&1KfF{QA/H`ae+K v-GͮE7B*b2ZM_=㯗zmimW\&?2sᮓC8kgf2KGF{s0d,Ӹ3!>>L{BzjC0ByW|'&&~vww,BA$!>!|m˗O8!7; [B8%%Ϟ=zBގû|&E bF„bF„bF„bF„bFŒ=yPz {NE Q3s>k0j,p^'_c8~#^l1o/Z -I[ uxV6QŅL7bBؒXp![!=5 v܉;v`׮][ |6*ދ+1m)^tRhPw\NhQB-0jTqD[ HLoʝg"MeQTq !_+,/+5_iӦBw Ϧ1߱Ư?zxN6{0B>T^>Bkp_UVØ٬Y `޽k7Pl]qWj8bfXt>%j(1Un:wPm!Oq x`L- UM(TQ4+M_ջ!|4cr-Zn8N>=uJqRa#Ej Z@cq!X22dP))1*Vu.Co=?7KLx%{un>qHH0Uh٦k`#xpf2 oFEqnd9 #292,:4:I?~Sg*uSL%jy:2!|:99K[=\ ~pqrD/qzLk7@acWe1l/S҄UYHK_~;~D>1y}"zu:t%{ņC1ykؽ.Be;wNΞooip/|dSq$0ezC Jl0\~89kZbvl;p+Vb;!{5x.[n•(PDc@8Epk*t;`%u(~lqp!ܳh_NF˖-UhX $Mxa烂N'mF/\8w; NXngt,/MxVq'E V5چ3zͩܿp{ @KaJ__'Oӧbbb}j{3kv㫎ՠ7~g (/QY+w2U6NAu0o<6Aq#l -F$lgie]Y4)郍럞C_y;w\y)ܬ;]3`)@"Vh԰Gd^vHs}4@!3=mPӶ|4n"p }AFFm6n˖-Ϝi֭͛DqwstNw%ӎm\{gpZM6ǵ~B)/.J7(0*Wra4\=g[ndaI{g WJSa>|0p[T]ǟ L͞Kq\ҥU\ㅶq7GcqFmY 6x!.iYuְYYY |[;* z k]kWQ׾2؋iLf u;7uFAyNr74U 1HiVӠ\6 [~~h5n " ըY[&'#%-̦ls:UڎPr4*j7_&%*4JZj%;0_(n{I|U!ョqB 6$blWomڷöyKٜ xW7 C`:mɑw>'L K^Dqyǂ9lhӮ/~S9=B0mȎ<՟HMC6cH*G--qƶ%Ÿeΐ$-l-gsR\-4ɖh]vF:b)4iPYp۾6&e0trpyr6'?VR]sW,5n B7& a?$]\ߣ@ZJoн=&]ZU{o*\gt,3JaB5SjiR?._Q" ppW0Z'q8rYY^,o_tNl#;f!;+fyPk8<0H,hT*ȭӪԐ-gO0#sv#\ _|kDG?G`U!$ BQOB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BsebyxUZ$ ALVj..t_7x0!/ ύ&vpFԴo}'ޫ'0jO/sJ(mؓ$DֵPWl {*D.z{GVC"# ;z&l$uNPEkkCƭ.&ITe5銗o Hi`Z(RJUk7FA0Y}cٺ1ݨzڳ۝'DF`{%:ִch_2_:Ca[D*T@b1}}*\ek5;緢~*䋎#/;|j%XНgdK? 油sl:FΙgM)[c||sF;ѥS;u'2#Ҏ^h-[q*%\܅M[)F[s\mayx+Z6ǯ2ƞJS ºKs]-̿Ed Xh [3%'-\{W䲸_vz/;ALy+ɮ?  +#-݊.PӑH&Ԭ5]fxrn RwP@i)pL,HyB0zI/$$ x= , B9ޜ{w'/rkݿe| $%۵Y/UQR"/dYJy~|i=BC`˖P,4!WIHDfFfn9ί°8|#Ɔ,S9;_4z6Ϯ"sj nUz`m1[+c'B>YG݁ Cqu(R;e]z >;ٻ/=75p.+;h3qy\8y__~%ǶSk>@m3a#pl G7n,p z;5(Spr ̳l gN) sq-KCvTk>ƕ;A]>yroBM% P!o& ̼Lt֦zo \hM8[;[b8y lCJ5VQ@~J%w.I1/ ᷰzj[̫'Wct;?+9n]އ[gg1qe:ڲbh/ G$`"(S[vÔ- =BynI )p;UX;6ZUDQ2xFoފR@Vv& `ܗPj%ڏ X=c޲} *T*Ka}7 [=SGmTYkǨP)U !?Axs x WϢgglP#9촸bpwꄅmq|nSƓ0l*O_.|fgO@o=BLjB#kb+!ߊ#>2}VXП !Č'L!fD!L!fD!L!fD!L!fD!L!fD!L!fD!L!fD!L!fD! g%!7̋SH+5ta}V^\̙37o"P^]ߎMѸsOd1b[&g>;y$_Dz1cq?^-ܯC! Y*_x$6puv,MGعHՊ ̋;HTrHa-9%.][Mʄs:y $Fcj|5:icTd޵K_ہS( ؖiOP(?۬Y3X[[Biee%ԩŋ[>/+Tmu/_;{ЪyS4i3wz?z-J7m, (QjFW4ЩL}[^P4‡~jyNA-h٬ |x?={X%BWmnذ_0jժ(R/@Iya%,ŪL<K/ļ91r9T?0:6hG g@ʾHM7_+'_v&,r:?'F=[J3g:O8vEK籉;W [4@!9::E[ޟABZz/;vQ\e7lqkA-1Bz1XE`ZhҨ>X]c(3ӑV ip@\g)AFFl3Ӆ5ver+Dťdq׃ yPlqyp_ᢣq pMv a 's8=v+SēѼwЊoBer'\REIkq1#[s:NeDq5qaԦ<"y]Essvp' iΝyqvW;d[czṰ SrCbcs*4 G à\\ "euU:8}F"O.5aBxy?.wBQ\r8=1+4K؋_ђ,x<U*-8/.sK5r/,*crKTokpl5`vOǵ{ͥp5Ko<%ĥi\Źw2Q;r X -Ӊbאe=䪔v^f h8sa`tqB>d3Oj + ~H2o4Cm{J셱*ABL0F6Z8 r OOcӦh۶5u 7W? o)ds.\NvR =2^Cf" @e\_?*AMpI6! /lQ_${(2 qxrݚ5a?z!33Fb 17bϿ)):s¦g.3'3K>τ… 8vGm@m#f"yU=nspJ QbDPj޽2vG`ٰл3tOh(97LG"ӣ0_][~xmSϚ9?f݅(?,t:-2Rɭ? ɬ:}nu:bcԨ_ \Lx/_`! BGX{,70oh_\{0b>-.þƎ _aGHBQh8:-a熰=Fl|&pJBVF l H0kycyn@oV7}9נgIٌKŋ8a2܋ty(?2J 3K?ZPwr 5;c){#e7ŝEK"x5JC8}FXsᗎ[{~I,b4.Ftl/УhTp6 êQ]ܦ򷟅_ftqGa7SR[!x.E1n+[? 4&K{Ma6ckfϋ38N.FHp#9g/| TB̈z„bF„bF„bF„bF„bF„bF„bF„bF„bF„bF„bFŸ7!gɑknq1<{f }^Q*(S86ma*яʽ63l٠La Ϫמ=}Ž{t^jRtFb SCxj=[tM=yy !ejVːJ”4iZ+W..uԳ(t{{^R_eb࢝U9$^:72?\=~3~[+e]S I(ləȔx"AT) g ~m|VRl +V Y|:Be\_-B"lVũ%]zkh|^ceB?a֭[;vp;w|=rzG8W3r1.k9.f\^(%pq|rLPɫ*on=kfY܇+t0vPU_yq͹7*5.jD¼~h`0JX⸑ JpO@y74 \2wt4-l vl>%J!zPhx_U c  jEn<F ȾFyl^GUy^R *K7Aec컕 dԂ\G| #((H(QTPq͓,˜|m39d`#$9M,$! O"eW -KڡKE;{6 bٶ&b`ص(n܌uz:B?B- ^:ʗ/'#MOշp0jtzqp|Zy`=^tx_J R D9u2J_Ya-#$$^muqK>s A[eA":Y~[z!8)1c3 U+EًPJDFfњxD2)Z 鉊u{QN|9Zuv@I0~cnCھiׅkdºt}|p{x/~MͽBcpRU͊YizBȇBߎ±|/(N_>LX~MAݪUС][7h#PFt:&XJ|7 +ܢѩ8\q:&cۦF䦩|&/:bůB:"@0kk883:w YI7{lyH2F`W]ѾSO8%׌=G0W{L]}Ll% ;v`Νصko-[ݻGeQ\UdicS2Ϡ\ptZaK^xvv遧0/wC,<T(<*]N}2 ڷ GB֩ xP AT a0$y xx@8NNc P[;z=b?aX8Y0sr_3}QxމB=;>!P`|nZm{lrrnvDZ%5f~;/º.G`Ϙ88-F(\?gXܿ/3'<;6aU _>d xha3<|on(Djg'{} ŽU,,u( ˽Ѭ< aGRe\>J8\{rvk~k`+y9%<ÜDG{!}B`\^8dlL՟-m`kB7"30!0!0!0!0!0!0!0!0!0!0!01ӛ'bWi abVg! EL^=1j@O|=~!ץ<œ ѳ{OL\]G#lt.N‰{xM)ƺcѣGO,~Vl3ዛv}rKkXYP>z#&-Aojki8t9Gy p37I\hSm|1r= 䣨TT(QkH9;v{0C;X'tkQ:~n lv1hڤ –ih[&GN: |DZطU68)N>&"@v}k! oRnI˖3+XD%U g ]58Ux5)rg/>Wp\F͇Џ+hi3~!nԎUW\E.NqL5ejr%Jr/\R/%`uZ|brJ74b;/Q |'0a,9E>$VPXفcIEpQ_Ц5PXԨùXic;[[4:\aŸZb˱,ߡѠ h(yή>S(k$ljS3  5J5ظgHHHẍD ?GӦYLbsgG{TIb+O$e&5 c)\:s}P(;y& I+ۏ.?AZ P]Ћªʭg B7؋/R 1x]&,_ԃmfp܏E 0gBNGşK0 `?-زJ 4v%B{agbZ 08KR˶r{RTfǰ[U9 kՄZM;#/=[z^>8$R B |z[X##15pQ\;p yƐ Q m+G_S*gP0!. a0ԞZNiO0!}0G!fD!L!fD!L!fD!L!fD!L!fD!L!fD!L!fD!L!fD!L!fфptt4ťۭgcȪһQm[LzWwǴOM Wm˶cSxbVM ݻ<~/wrN{c?r ƆKpsRmpl+ISB aLzh۷_ 3l`\K+?*`Dh;`8Xڱ3z8$~ SZr<6a~z'_:y@s8|<\ tò㏅x E>8lmlQaĊ+*_O@҅`i)CSĐeqd\N;ZeRY8dwPG ^~Oar"䩌-T˄sƄRX{vۈy %4'&aظ:[;G}/}xk~59Is~4oZ6rFȭLCBg⪤FOYkZ+k_B>}M `~H*Tέ7 Ql%Ua6R,k/CHϑ;},Z'77a]Vmqk$ 4t# LQeC0";3:'tJW6SѨP,7J8Z&AQe1]pbw{ ZT,qzfg ExGrvB }GG a۪U)y5QNFD1eʴwû[q(*_G > R !H|p Nkg~UU!Wa?ƈ#- V'cH20HvAW_Uj=F:9JPx;Ha]&Foa8÷ѤT(8m!Y7 jzCM#`]vW^OX UF=?^DJb !\>1Z@%dR9$O0y _@[Ė7H"nrr QBbFuOB̍BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB̈BB/ w*IENDB`esprima-4.0.1/docs/conf.py000066400000000000000000000024641331122015500154020ustar00rootroot00000000000000import sys import os project = u'Esprima' author = u'Ariya Hidayat' version = 'master' release = 'master' master_doc = 'index' exclude_patterns = ['_build'] pygments_style = 'sphinx' # HTML output html_theme = "alabaster" html_theme_options = { 'fixed_sidebar': False, 'logo_name': True, 'description': 'ECMAScript parsing infrastructure for multipurpose analysis', 'logo': 'esprima.png', 'github_user': 'jquery', 'github_repo': 'esprima', 'github_type': 'star', 'font_family': '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif', 'head_font_family': '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif', 'code_font_family': '"Roboto Mono",Menlo,Monaco,Consolas,"Courier New",monospace', } html_sidebars = { '**': [ 'about.html', 'searchbox.html', 'navigation.html', ] } html_static_path = ['_static'] html_show_sourcelink = False html_show_sphinx = True html_show_copyright = False htmlhelp_basename = 'Testdoc' # Markdown support from recommonmark.parser import CommonMarkParser source_suffix = ['.rst', '.md'] source_parsers = { '.md': CommonMarkParser, } esprima-4.0.1/docs/getting-started.md000066400000000000000000000125021331122015500175240ustar00rootroot00000000000000# Chapter 1. Getting Started Esprima is a tool to perform lexical and syntactical analysis of JavaScript programs. Esprima itself is also written in JavaScript. To get the feeling of what Esprima can do, please try its [online parser demo](http://esprima.org/demo/parse.html): ![Online parser demo](online-parser.png) The left panel is a code editor, it can accept any JavaScript source. If the source is a valid JavaScript program, the right panel shows the [syntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree) as the result of parsing that JavaScript program. The syntax tree can be displayed in its original form (JSON, but formatted) or in its visual form (hierarchical node view). **Important**: Esprima can only process JavaScript programs. It does not handle other variations of JavaScript such as [Flow](https://flow.org/), [TypeScript](http://www.typescriptlang.org/), etc. ## Supported environments Since Esprima is written in JavaScript, it can run on various JavaScript environments, including (but not limited to): * Modern web browsers (the latest version of Edge, Firefox, Chrome, Safari, etc) * Legacy web browsers (Internet Explorer 10 or later) * [Node.js](https://nodejs.org/en/) v4 or later * JavaScript engine in Java, such as [Rhino](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino) and [Nashorn](https://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/) ## Using Node.js to play with Esprima To quickly experiment with Esprima, it is recommended to use Node.js and its interactive [REPL](https://en.wikipedia.org/wiki/REPL). First, install [Node.js](https://nodejs.org/en/) v4 or later (including its package manager, [npm](https://docs.npmjs.com/)). Then, from the command-line or the terminal, install Esprima npm module: ``` $ npm install esprima ``` To verify that the module is available, use `npm ls`: ``` $ npm ls /home/ariya/demo └── esprima@4.0.0 ``` The number after the `@` symbol, `4.0.0`, indicates the version of [Esprima package](https://www.npmjs.com/package/esprima) downloaded and installed from the package registry. This may vary from time to time, depending on the latest stable version available for everyone. To play with Esprima within Node.js, first launch Node.js. Inside its [REPL](https://en.wikipedia.org/wiki/REPL) command prompt, load the module using `require` and then use it, as illustrated in the following session: ```js $ node > var esprima = require('esprima') undefined > esprima.parseScript('answer = 42') Script { type: 'Program', body: [ ExpressionStatement { type: 'ExpressionStatement', expression: [Object] } ], sourceType: 'script' } ``` In the above example, the `parse` function of Esprima is invoked with a string containing a simple JavaScript program. The output is an object (printed by Node.js REPL) that is the representation of the program (an assignment expression). This object follows the format described in details in [Appendix A. Syntax Tree Format](syntax-tree-format.html). If the source given to Esprima parser is not a valid JavaScript program, an exception will be thrown instead. The following example demonstrates that: ```js $ node > var esprima = require('esprima') undefined > esprima.parseScript('1+') Error: Line 1: Unexpected end of input ``` To use Esprima in a library or an application designed to be used with Node.js, include `esprima` as a dependency in the `package.json` manifest. ## Using Esprima in a web browser To use Esprima in a browser environment, it needs to be loaded using the `script` element. For instance, to load Esprima from a CDN such as [unpkg](https://unpkg.com/), the HTML document needs to have the following line: ```html ``` When Esprima is loaded this way, it will be available as a global object named `esprima`. Since Esprima supports [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) (Asynchronous Module Definition), it can be loaded with a module loader such as [RequireJS](http://requirejs.org/): ```js require(['esprima'], function (parser) { // Do something with parser, e.g. var syntax = parser.parse('var answer = 42'); console.log(JSON.stringify(syntax, null, 4)); }); ``` ## Using Esprima with Rhino or Nashorn With [Rhino](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino) or [Nashorn](https://docs.oracle.com/javase/8/docs/technotes/guides/scripting/nashorn/), Esprima must be loaded from its source using the `load` function, such as: ```js load('/path/to/esprima.js'); ``` The module `esprima` will be available as part of the global object. The following session with Nashorn shell, [jrunscript](https://docs.oracle.com/javase/8/docs/technotes/tools/windows/jrunscript.html), demonstrates the usage: ```js $ jrunscript nashorn> load('esprima.js') nashorn> ast = esprima.parseScript('const answer = 42') [object Object] nashorn> print(JSON.stringify(ast, null, 2)) { "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "answer" }, "init": { "type": "Literal", "value": 42, "raw": "42" } } ], "kind": "const" } ], "sourceType": "script" } ``` esprima-4.0.1/docs/highlight.png000066400000000000000000000413051331122015500165550ustar00rootroot00000000000000PNG  IHDR{sRGBgAMA a pHYsBZIDATx^|g! H@jHH RQXQ]NDi{o%fLI6 Ih>~̙3s9svƦ 9q3ec@DDD.  DDD`@DDD. K~…&f3\](R:@PVĚ4, 9K"""*Aooq.U5V59Js`7(  dee@%5򈈈dXew[yjXQ8@pTP`yZs `nkܢ(p` XVp`%"""*uN*pww_UEQT0lڴ%@'"" }믕<< +1eqSբ28q6uș4IHNOfOώfu*3R!X= 1et <ѕVZXs+gf{ Qf]% $&l74)wR2ѧ eHEVf&lJdM˔)Q5לxNk2D~̙-nC|R92bMfO;|"J|3 ۲XX'jVs;/SCV߂%"*9*e˖h޼yvjѢnF޽ʩ\2~+eT۷okf% l?47`·i2=YL 2%aGH'2DYG# SV($Ҳ9i,"D6m1pl;ęy%aft{ F?zMU=&clmS&.DD%GUtŪRWI W]Iܧw\A s /Dux'& i43Imkn3&AB4 8u6gÞ|/)W 44߀8!"RU]v#:X:5\&E{hUtn?-ՇGu+:kͣ/>݊bذ@h4Ù8o^G!) =[Wł^îXY)vK 9J@dI 'eׯźc2:"rΝ;CRǎѮ];s,*lgd5 &jTѳ8q/'FZx vtk]hn#ë CdEsb'jGbߞ ~05u 7oCj#]w6<1HOu # DZ8w3b3ˠRH8Ql@ 0jGoϨw JQ-Ю}GmSdZ\8ޒ!@)lپS e*XވfMi>7-`πϣ4KW!zj|uoNR@h4i6 wC>2@qv%ƬvÁz^ d3Y8q6Jkؽ0xoͷ*L%t q1?w !ĵug5ր~ee Uв`4yQgpuB+'-Ư Y PѮ~X{DN= #HKըORiY Rz[*,AȐng]EgF_%0)<ԉ[p,ZXW[kX9 ߖ8>& x2/Kh~B*lk(:(]iY=up9j6Y j"wݺu믿+6dWΝ;n} a .\h:?) R AT=+s/H#HgaICr2@:6vh*Qt^e!0 )AQAWZF'"!WץʆcnwCxrWc˞~ިRãoډYeѻ}}/( Jxx¿bu #)+l}{м`f9(@syAjXb5ݍQ5~^*U?dfx"v%V UߺţVdxJ/1P&{8ZE 52CQU*!РNU]ZݷgO\$xrG%s:" ֭吕+-$$*bQ8qBbzHfvT%$L:'WJ }q6hjft{Hg 7XUDDDtA%$e"""*~\0@ """ """rQA.>B3GN[+IDDt=JOOkP^~Dܫ9`РAXd9̙3#11R0*@زe |}}z=AQI9[_8#r* Jn{}j\L 4~ޜp])LyW)Y+ @+E 4iBd'l{qE&|`(T/.}#tW`pc'4Ջ>xm"I4M-ym?$2AP GT@+MS7 t'D4͞"(UFBR&[ 0rCƭѲmG<=[Mo5o֤: ካ?9/G.9[1.L4 .3LR;Ur~Vi\^Ҡ0q,Ч9@I@ $Z1]-3S׍g}C}Cu˟kI|.,;2[oi?sBi)HH>߆uേ`!X#Y5y-xqSt/ϿB"q^zcٯJ([ "v-c0nxxڃHU;ƌBd,>eL{1_=2+3vFJ's+iWt:wzS2( Iwa]w#'׈AƄ\ 4)^G&s$%WU4v2{rO/932`IeLr!$'yхI`2tl w%3lBRkYNK<U),做Uⲛ[-Ýyd*FrLT ^6Li\YG2m}Oo9Q:ߐO%몦mTZIܪeN7zR nUY3َMג_A7_J:s"Qo>PWYRxYOaIkM|-uepRO軁;oI<l';0y9,bZ;pj§ꍘr$`;?l1u; 0zH >cGևVFD1U1e1><7wxy=a}~\ds`ҝ0fܬW{Bf*<[o҇+z Ÿ& @ta>j&M&rRvTLv7V~Ud e;n/:;v4t*GJ[*UIA?,0绥ѝMu`)͒nq*URhrh ~\R&X_T$%Z3IMdy ;a)ݜ ,3{Yىey٣ƥwv9d zk,v;@-8Ff -8 儔5+K#;WT2{_"Tʷuq2d .s&DcW~D^媡kxX+[)kehԸ>zeS9GB-Kl(2U,-NIo?EFqr?@F;#Gf"z ۰ V,NlݺtBi,T]o ]܄je:wGNV/| sSY kcw@{n}Fr)]4fϞS"!! gp84ݮjZllAm@zj2E&Ǚ_`mG1/*u_8onh5J59w6\5ôaUXG49Kim 3~h'=wzV?YCp;K@/Oh.æ6)=4V2f6AeR;ڕ{XmbcO%o|7v/UCc+o7wnY,̓kA({%%^xIC`<^|YC290cR3w%Z~@C;530gڼɫgФ?I?) N|\Ҡ>TG'C'>!HJ#wQmhx^ƭ$Ө2Q^QCiMnv>\0҈vLw`;J>cc)d9mϻ}Ʒ;_Pߓr2> 1Fwƾ_iX|ڶyF[k0UjvaL+q}v~VvB~n0mIM{k\ytyLVhNl匪imaطkM]e]4#i$̞:~;E{c쇹N8gW=-V%Po+?칟5NMKZyZK鰦=!,RGߟ3TY\|w7[N5^|E=w\vRf͚uM{={j111zkիWk7nԎ9e*Xjԥi1Ƒ#ӱX=@6Th]gp /^ͤ~x_VG>pۄ"̚%W]NE~`  QSϣ/tGhX7 ^Eif}Si?٪D!ey/˕J2k'e7{gxC%_B?D4#;kg25e_GPeyOo}/O1־ esl&]Iw#݊!18xUư㭏gd }t?hƪzXráw/]1{US*q3 ܠ[ pa|m-,TyGWfdCr%)QR5N!(V% +ؐg̟?_Ɛ xc.K8srzo2Une]OZ' 7'ko=a=#;Uey(~*unBJ9a`iY2&Ǵ^~fe+k_Se*#?<O U{`F]M|> 9˗mRݷIrd7FFykw E_%g:ޢnU9d6ʷ6jf%xQ)_D ⇟9fϼHWM tʼxJl9k=J S'ˎ*Q4FuU]uH`*^Q73Tke%$X"-ωyyO6zYJ/Zu@K&HPxMot[f 9[vFMq% v3s7H9O Hj[\/k_+Wn]@zc !1nY'wdWpYx_3lpj!C7ZdQ| "<|R3NNcgtrOAW1}7O6iK p kk,H o/1fx7Ob骝 "_kKv6N2@WL`9&TaawNc8*0qgRTt8y7r|r0MfnAh]kr#ZT^Hpfh,;>88QƥbԨQh֬\sArr$K~ޥO'HR.F.!4TLH'7V(UsٳB程h'bvٕO.@_c䜱9Y.zwί>5͔vv+DKA _8toisѥ/W[?Vzw֡kM_bsq$vaHj,ˆ.\鶅TG=37UYdpWs0TU%:VYo)fAQbಒ[ kؿr@ΧQSѼ}gK>~~zK6] L״5O 4;W/y95h~9&X7oݹO}^y5I/竊 _fp_&Wo =|YnNio;g#fC`+yy~ )$]=5%57SS$JVfLt &{~rE$-%% <5-%M;--N[᫇ttY2?y]YT,Rf-G,RVy7zNTݙ̕L˻Tqs։Oq򣦱S ZQt5u'WӪ<Ź1oqͳ[e'+;~mlwT޺Ⅱn@d}݇ϳK:_1t!<.4k˲ lF>nreK[؍sp 2C܁jᄃ'۝ +\&u\gdz,Wͻ\kڲBj=2b,3~|ۼ#:?^>h.,u>Yn y0x }S2k-Y< %\[8KFCS9$ ,0""*^ ܇U➗nËn9ޞY=fcއjFaAr_}-)ХF)8cp߈;*{Pj-[[Ga1hQ""kε ?#*~~o?s9DBحi9z0 Ŵ.cTwXS-Wcǣ_ RCnhà5zX2o̫|}ڑǡq1xP|3F+x^ hhi<,[= FG" eF@C㕫ur2߼ek-|KVo>y#8G cѵNƢBL^ OG<)Uz?_fe-' 6Yv_>Æaq.;-w0>ynC*z@;O>9=etKsɫ t5z]Ml\%D/ҩy  < % @߼ˇw( %`:TOG͝W]V>fO`g+`ӎ} ~l5]s |ZO qG=-l^V醛e棏hx鑜'aӣ='~ Sn1'РtL5Yz򗼗45ܭaNW >4yRP`/}XO?'{wGY8FVѴOSa/m۶M[~}Ӻu 6hk׮zFra|w\i5z}wo6O4#+⡁P;$Sߢ[z7u` gi#:OO`RG$${S?^}{ YٯVo PkSZ>}^cAZP0)`27+_&WF/v,&x1c@.է;cX/ x' QZThy 9GEԓ3R?>s)++Ay8e@ʽm?Z'7f`;FT7|9ӿ/[< <yx\pQ2|!|iN>O_eB3'||2zJ?{"Y#_q˳#E6Hkpس`pI@Es[&!=5gAH{5̹a3x"jD{̡@-uo^^=!9}zkݥSNuEV}{YJ*.ʇǷ 紐`!;, @8痯jK J )+ӥ/`Ng4eIf.E-qO*CZ _BʄL* B0ȗܦQ x#oVG1""9@p+̄얇0󣰧gWi1= #>9{jx,4=ۯ4tC~A[Ӥّ)m?c󶛹b}4 c7_Ċ@ggH.} [tj/fͅzTק *s#2pr/VM`O?/%3- Vj<7zK!%==^/r2gxy + q n=(߫׋u>nH;DDt˚trI/kRExIos$"" zY-Ve1HDDtQTR(fDDDWUK_T\0@ """ """r\0@ """ """r\0@ """ """r\0@ """ """r\0@ """uдS?=_oj O߬B[@Et]nꂮzeP37[pmzB0?shk ݺtE] \wyqf߅%rf?ѿYD?{ 'Ǿ'pWѭmpS&gf 6x[ѽAJv-/t !}4Ay_]wCw> Ƈ?m֯f!""hp84ݮjZllA\fՎ43Iwf_T>sJ/,OǛ!%/ c*>-Ah6մ̝Zy+?v\ʭ'4;KklZ{˴Gb?B[m)G>m6Jsb19u+\ PhSK-oL/^ƞ;wPIڸqv-..N/UYWTHўjv>Jƍ7?~DxdTkpF׿u 2tN- %{a=_סXW9_&Cb7`3Aq BTJP[(3(GԊFmtX53I8ҕ]I,lݺSf -3>""7{q"1p=<ADDwܹB\yfIp777=E~P+~Y:uj?]6S"B k"@hР%znkj֬tPgq]_Q ĪYkM3u릿JU{j/]R/ZRoeւ m۶{7zj@DDojT?Xo'ʨkI*jںu+nt O>y4ѕ.[͛۷cʔ)zC¢Pa*jjܸ1w+V`ڵ""+OOO Name Type Default Description range Boolean false Annotate each token with its zero-based start and end location loc Boolean false Annotate each token with its column and row-based location comment Boolean false Include every line and block comment in the output An example Node.js REPL session that demonstrates the use of Esprima tokenizer is: ```js $ node > var esprima = require('esprima') > esprima.tokenize('answer = 42') [ { type: 'Identifier', value: 'answer' }, { type: 'Punctuator', value: '=' }, { type: 'Numeric', value: '42' } ] ``` In the above example, the input string is tokenized into 3 tokens: an identifier, a punctuator, and a number. For each token, the `type` property is a string indicating the type of the token and the `value` property stores the corresponding the _lexeme_, i.e. a string of characters which forms a syntactic unit. Unlike the `parse` function, the `tokenize` function can work with an input string that does not represent a valid JavaScript program. This is because lexical analysis, as the name implies, does _not_ involve the process of understanding the syntactic structure of the input. ```js $ node > var esprima = require('esprima') > esprima.tokenize('42 = answer') [ { type: 'Numeric', value: '42' }, { type: 'Punctuator', value: '=' }, { type: 'Identifier', value: 'answer' } ] > esprima.tokenize('while (if {}') [ { type: 'Keyword', value: 'while' }, { type: 'Punctuator', value: '(' }, { type: 'Keyword', value: 'if' }, { type: 'Punctuator', value: '{' }, { type: 'Punctuator', value: '}' } ] ``` ## Token Location By default, each token in the array returned by the tokenizer only has two properties, the _type_ of the token and the _lexeme_. For some use cases, the location of each token needs to be known as well (e.g. to offer a meaningful feedback to the user). Esprima tokenizer can add that location information to each token in two forms, zero-based range and line-column location. This is done by customizing the tokenization process with the configuration object. Setting `range` (in the configuration object) to true adds a new property, `range`, to each token. It is an array of two elements, each indicating the zero-based index of the _starting_ and _end_ location (exclusive) of the token. A simple example follows: ```js $ node > var esprima = require('esprima') > esprima.tokenize('answer = 42', { range: true }) [ { type: 'Identifier', value: 'answer', range: [ 0, 6 ] }, { type: 'Punctuator', value: '=', range: [ 7, 8 ] }, { type: 'Numeric', value: '42', range: [ 9, 11 ] } ] ``` In the above example, the starting and end location of each token can be determined from its range property. For instance, the equal sign (`=`) is the 7th character in the input string, because its range is `[7, 8]`. Setting `loc` to true adds a new property, `loc`, to each token. It is a object that contains the _line number_ and _column number_ of the starting and end location (exclusive) of the token. This is illustrated in the example: ```js $ node > var esprima = require('esprima') > tokens = esprima.tokenize('answer = 42', { loc: true }); > tokens[2] { type: 'Numeric', value: '42', loc: { start: { line: 1, column: 9 }, end: { line: 1, column: 11 } } } ``` Note that the line number is _one-based_ while the column number is _zero-based_. It is possible to set both `range` and `loc` to true, thereby giving each token the most complete location information. ## Line and Block Comments By default, Esprima tokenizer ignores every line and block comment. If each comment needs to be included in the output, then the property `comment` in the configuration object needs to be set to true. To illustrate this, compare the following simple tokenization: ```js $ node > var esprima = require('esprima') > esprima.tokenize('/* answer */ 42') [ { type: 'Numeric', value: '42' } ] ``` with the following situation where the token array also contains the block comment: ```js $ node > var esprima = require('esprima') > esprima.tokenize('/* answer */ 42', { comment: true }) [ { type: 'BlockComment', value: ' answer ' }, { type: 'Numeric', value: '42' } ] ``` If the location of each comment is needed, enable the location information using `range` and/or `loc` (as explained in the previous section): ```js $ node > var esprima = require('esprima') > esprima.tokenize('/* answer */ 42', { comment: true, range: true }) [ { type: 'BlockComment', value: ' answer ', range: [ 0, 12 ] }, { type: 'Numeric', value: '42', range: [ 13, 15 ] } ] ``` ## Limitation on Keywords Since a tokenization process does not have the context of the syntactic structure, it is unable to infer properly that a particular reserved word is being used not as a keyword. Therefore, it always classifies a reserved word as keyword. A simple example to illustrate this limitation: ```js $ node > var esprima = require('esprima') > esprima.tokenize('x.if = 1') [ { type: 'Identifier', value: 'x' }, { type: 'Punctuator', value: '.' }, { type: 'Keyword', value: 'if' }, { type: 'Punctuator', value: '=' }, { type: 'Numeric', value: '1' } ] ``` In the above session, the type of the `if` token is `Keyword`. This is however different than what will be obtained using Esprima parser since the parser correctly matches the `if` token as an object property and therefore constructs an associated `Identifier` node, not a `Keyword` node. ```js $ node > var esprima = require('esprima') > esprima.parseScript('x.if = 1').body[0].expression.left.property Identifier { type: 'Identifier', name: 'if' } ``` ## Limitation on JSX [JSX](http://facebook.github.io/jsx/) is a syntax extension to JavaScript, popularly known to build web applications using [React](https://facebook.github.io/react/). JSX is not part of any [official ECMAScript specification](http://www.ecma-international.org/publications/standards/Ecma-262.htm). Esprima tokenizer is unable to process input source that contains a mix of JavaScript code and JSX. This is because switching to JSX mode requires an understanding of the context, which a tokenizer does not have. In particular, a closing JSX element (such as ``) confuses the tokenizer since the forward slash (`/`) is identified as the start of a regular expression. ## Example: Syntax Highlighting The following Node.js script demonstrates the use of Esprima tokenizer to apply [syntax highlighting](https://en.wikipedia.org/wiki/Syntax_highlighting) of JavaScript code fragment. It accepts the input from `stdin` and produces color coded version to `stdout` by using [ANSI escape code](https://en.wikipedia.org/wiki/ANSI_escape_code). ```js const esprima = require('esprima'); const readline = require('readline'); const CYAN = '\x1b[36m'; const RESET = '\x1b[0m' let source = ''; readline.createInterface({ input: process.stdin, terminal: false }) .on('line', line => { source += line + '\n' }) .on('close', () => { const tokens = esprima.tokenize(source, { range: true }); const ids = tokens.filter(x => x.type === 'Identifier'); const markers = ids.sort((a, b) => { return b.range[0] - a.range[0] }); markers.forEach(t => { const id = CYAN + t.value + RESET; const start = t.range[0]; const end = t.range[1]; source = source.slice(0, start) + id + source.slice(end); }); console.log(source); }); ``` An example run is shown in the following screenshot (the script is called `highlight.js`): ![Syntax highlighting](highlight.png) The script uses the [readline module](https://nodejs.org/api/readline.html) to read the input line-by-line, collecting each line to a local string buffer. Once there is no more input, it invokes Esprima tokenizer to break the source into a list of tokens. The script only cares about identifier tokens, hence the filtering. For each token, the starting location is used to determine where to insert the [escape code](https://en.wikipedia.org/wiki/ANSI_escape_code) to change the color to cyan and the end location is used to reset the color. This is done from the last identifier token to the first identifier token, which necessities the sorting in reverse order. For a real-world syntax highlighter that has many more features, take a look at _cardinal_ (source repository: [github.com/thlorenz/cardinal](https://github.com/thlorenz/cardinal)). It uses a similar approach, i.e. using Esprima tokenizer to break the source into tokens and then wrap each token with a type-specific color. esprima-4.0.1/docs/online-parser.png000066400000000000000000002047571331122015500174000ustar00rootroot00000000000000PNG  IHDRmMsRGBgAMA a pHYs!tEXtCreation Time2017:01:21 14:13:20BB_xIDATx^UE߻EwwIHH "!( **J"4ҝ Jww,۽{y ., ,|95g93|͌ɬ   Ql  &A+  iD  iW\AAaL&WXpFHĬ  \jH~RlAغ   <5}\qlA/Woll<  Wm aBmBu_o"  a\(h PAWJo,X$  Ĭߴ:k/tvv6B5"`ܰD1z .ۊ^Ast.t9.ƈrqUNA}x;v`:R-\0VX'br] n }z0kǎyMAAH-X&\#%`Jӄ еkWt]/:t@̙SZ,WWW4o/^DժUQB,[b6HQAK/_>{5kvҢE }G ʑ#^ʔ)hꫯj1&k Иp Ν[owss|9&s]t ~4H"Ȓ%UF@kq܇9sbZѪX`AFs>Ņa pS[iϣc|;u.] cƌ:R1_}(8.{ BZ5SLڂJ&”e, Cq˅SZwPZWQ<-Z{Y.m?Zl/1h{뭷d "Eιsp5/^ٲe&M6a͚5:ꣻyf-(.6l͛;gϮ-)ԬYS7b@I\J=Z͛~~(y 6SXsW?( 9s{yf|r4mTRJqq}I&ɓ'5WL[u?kv$"cr9thhb̛7O?/ǴA$i~. ;snݦzREjkekX5d-S ڌzׯ<.V<&z X>t`̚5K5ԯ__RTS d ]NB 8 ;vįkq}>x^}^ҥaڴiZݻjz52WhMf:L:UW9n%!BJ=7͝;w.)ޖXoLAAxQ/W{;|]eذaftŊӂW^^o&).hyqk-L줰tMd08(tȑ8|nZNƗ/ /_&S^=@K+-ZyxNb1oƍkT{h+?$lݺ.<-V ÇO?/fGA_G}Ay<ӑ \. yl(I%E;xذ]4a cs?-}aT\9Y^{MorSv 7жm[N -(QjJ[y -{m Ν;:A bZ~:9͊}l(:|L+~1,a-$g.r!+ )ObeC%|hSLr?@ć%#IʤD -sP<7t3Ex1! 0<5(Pc(Ը5>qi*j< :y< ׹/kg" D—bI}$<7kK, < Z}wwxٓ\AK8A%yF>ly\K%-KQڄAAHIReyoAAiR  ^NpćGuAĄSrwé  <s nb =AAx(X3P>]Z!  3n0hB  B2ʁ  A" BZA,!%A!&&F/  嵃;ȑy䁧N ;NxNNNȐ!tXJBcVxx8 *E3l<5AK+%/Pvj@ׯ_Ǎ7o0Z{g˗/|aA:Buac[VXY5nXq-ZRŋcԨQPF Su(\0*Wk׮|ؼy3TZU Дg-S^ti)Sҥ6W0ի2fL[l}rs0XZkook-SN4IL[u;=z`o߾G~i"h1BTXc1<]bsiӦMkԩSѥK- Vc-:vӧO# 0#{VqOx]f)Լ7f40^ϲŚ?PVPAڝ;w… ߿ZURE+W̚gZKO<[E\rE=IOc-n9r,)*ip7oN_-[0g~кggɾ3JB_> l\^RUa ٯ_?ԫWO'p޼yWWW9rD>@7< (b׭[ h?O>D]p!/-lB5qI4|̬Z-[6;BZ03>Ӣ"V`fhT<""y7ù0Kˀ޺t7Pkڴ6Xķ.O^yo^{ *UJrv]L'ӎ' v4\1/Y&ϟYÇ/@̙-?=LH/kI-F֖p 6g)PZWZsiAi}VxG qv ּysÏ5nVD2¿n̸L/3:B*ty cxM?~p}@YnР>C-iQ_QZ54iDQ̱ո0SY5 (ϙ={v-Y3Ʀ1VlSs_r!Y*0y uZZ)P8%_Cy^w?Z x,=-8`\\rs7/4歓'Oy5 ,/ovء=nnݪԄg\~G]^ 6СC.quYN5jH,7YL2E\he9|qee5YLҸE#Uc=.Oӌy.Y{jzZMR|G7-7n|Bs<?)|if3_`(d)_,~/E|իƗN+W.ϦAvȤkO'k6l"B.E-_nH">>gb ]d:L>]IAHfiӦE_-ƃxNU~@Z$ N:ZSE83:Ş 3{jM7oNf[xpGjA+ VCAxZ0ofK9+8M1[Wy|jkuv{qrG!?Xf#vdZ~Q:gFK!̄b~L܇~dMq˸3sq\W,hxVt%\xLh>\Z@)4{…VaGI-Vfn6]3,%GsS}Z%_wy۶m/=0ٌ6+ R0"HKG(hydz1L%0\$Eڷo_-QbQf,Zy_'ᱼUZӀiu^nz BrI晴gHQHaEqCW5,K&7E.4FXάZ Dž1ibLq[n eX>H$ZGi + kgak%WD }mkye/A+,)WYOT7ebS'> Zhc$m&T)LۚY>G}W/ X |eӉ, 9?t`yAhH! yqyX$$a,k417L|>8.+gP8Q= gq/{Sh2JёPRph.ގ|ЬűVKAGS6;T<(IA0.lgX .F((M΅ϔa휵^<+Ӈ?bDkܟ:|x}f|<'+A3k2XI==|=e-Z3v^L3(qeeזw<5 b6z_Vۭ̅sq^0Ax۬`Ak.̗G3f>_1/f b+̣gK[h`eIvPb45YֳxyS°dW)OӘoLSw4PXst^",pIJq`pCJ26<`Ÿlftd\X5aФ(.v.BDAOB]1i͢I <-vj)f _T}oA,g4SR>̘(Pt_~>?à/?xX0_R޻UTe:c ?|׭?Ю5Y´㹬nƙ’ Z! @^ #:|e <>_eޓ5KO7ӒdøY?R\_.<5\//XA`>1B30:YV\Z$B wm˪/{o'L[vJcm+8wiE 5T>UAKx'yOʳ>КԼ~Œ$x1ƛ}Vόi%+9}n ikXw,7lc_ kk]R0~i]a:$UV^nQZRXǿLs. +lYKkI.qI$<⌵FJ}x 0g < |QyM-}i9=  )yɅBglƉ_RRn6oެ=SA,gIo$"aG.jVy./#"h_0mAk2aYA/ RAgWBJ!VAAH<(uGʁuIzHAAA`x.|   XH7Z ڛ6t3y?;AhGCmy:  iQ5ڟt[Gg#hm1zd%  dGl4`lڏe2u S珌0VAA!>ZoHH^?JN&_> @AAH5q19r$)e5"hAAT.BRxB3  BCذ0m͛7/g'''/K,  s`\r!<<Z>dEF90~'UlQ㛏aؾ,7ouk0{f@٢[ѹ 5+/67Ncy([- 7_`>. coƘ@йVo؇*!7=kqj<c9PxIyh%[ T-NnHxKݟEv 9kֈe)Wa렽 4+ƒyfm0c.G^W RKaTyF@]`]1  փҤ(=DϏ}DE#!FÈ%s>;*/`QdRpPvqt `(^uKtfj>ouSwO#$i<<er6BR̨Vn^B=&\O{7wةRdk״!#B*L:}߾%"2!4WQ2ugCT<2Y6E[]¬(%!+]4l%ꖽwpz W'2oo:D$&t1|l\釨(]꿇ꗷ0f,sٲa:n(PUt)ⵐE=aGC6 st N^ P?Bug|rɄ~1sJwfTYoV-mipvkmp\ C{#` `3UfF٪5Рzbka~.ܸ Qw*.G_)sIԳCyeU 1{2sA*^PFmԯZ!>[՛v۪s@Ѩ枘ڿ`} + .M /5^ s6&[5{I n݌'"[7q|lܹAa*m3dA൒džbɢ{B">+*UU{$e+G|>F( Reg q~,\Ñ![^^-T*~[Au@eѢy#$d死pyG@ o)ڣ/N٠'C|a㐹ty \; 8QКao(|ӭ>=pWnGGTt?j%m~ip3JU3h` 3 GQ>nYozFFr,Y"cᩞ{fc俑.g)٣`KoT犟{t1d@O\<Y%+ ޸[9o-~H˶QBУ?eg޶޷1ʖGcu.mS7CbQ~~Uc{ɋcރ"!kf ❗`cG:". Kک;WlN`Ƞ{-ۨD*;|BT[5fg`٪8vm%G^i?{9%ƒyžy7)5nƤ Xk &,D*\`?~un{F#(8a0:zVp:dɔ &{wQb6.|DQdT^l`U3~gG?6*v|tZ YC=D/?o=d WuE 4vLpu1JkaYAq #,G>Ìqꊟ*dGb>'xgԵ=z:wW=ƒnbضfL`ݏ×gș+ v+/Dݗޞf'=n`R&2?t2n^7SgǶ,maUR Odر3F\Q1V;;L't?ށMl܂Yƞq?'Nž#wcgxةޭK7t5KVlbqIl߼[N{Z FPPއJ˘J|6ܼ>]:8&sEm4Jwtpy#ҩtёzp%G+$M,^)OqHw ( /G,AlFFqbNL8 }9RΈąqQJmyJ*+N]cޣ 'ySW2o |`okCO:`ZG>mZqb|GySθa4h\|답 'oe A#&`4$,qvĜM}SsSw4Lc[޹z=7FVb8=*;y_L+><Cg6%ca kЯybc/AG0qOik_q-Q+x ⅋Z6wea`͙%#<:3+ZWPۨWPv.7E3+Ƞ9OdȖ?>O%KƩ@9c{L<MMcgysPHzDBkco;;{DmT JV*m 37?aaֽϚʅr {O'<wژ3} T%¥=0| عC~#0uX uf[*]MtW=f 7BXe̜7 CŸ3s8#Qa@'~j;{;Z}΂J_ǬT~9P@^ڏ3{WPB,\0Ç ¨q1{/ȕM TpwV1{Ɵi)ǹt9m19 SBE%:́#]YSR<!oP7G1铸~'sG"iWl4Rԉcј3a rgM[h=Bлg_\Ff0wt 4#R߆=Ka^-Z1#!0s\|f9xzc)3'6ƻlTߎ׫ekƼ{@uUH׾+YsٲdV5 }C~}{~ Ou:V$#.;{^+F`%?~?ƎP}(f͝7J@ĝc3megt^2Ci^KXo_[&ReHvB~/ߌz*cdө+Pt~'Ţ?(VH0Fۡv<30}8̟=Er} 9w>\>iPAiC1zp#P܉AmP䃇f=l}=DnA>#n]: |o`I6j<͚V݁>NwVt9 A`ּ5*={e10r(1`a:bWb8~Fl-3J`An]ѵkWt>me;1.%2cb]r1Ц;hۡ3%&l#"HGFx|bc"QA8Ç:Z` b'zh#s0%`yx:PFJ߱8\qI̴TG>; ~ؔ4&DFTݖx+FNYq~Y٢m- Zɟ߶x﫞xH6fT.o*!5 fs[]Az$=6n$az4ZT-bZkGƆcbڊGo }cNcx*ѳ`<#xvx^f5A^,cdXgy|Wj%)'Oߓ3H'|ر'_7#*Ɏkv`Éܺra6Ș!r?5h (QW^t c qfW{6XU&:[J Ϛ˴>Ri^&%"pz$XՆ!IRdϜPtã!O1󉯘[|*,7ubvīhRޭurZKUFɺ-;n{ߒO~|ܤnrT\Ky"3QSXȽ4 l. MӚFZ&Uy~P툀+tX?[^E\UIPĪ Mm!LJ3#MuRBw;WrXs"ypΆuo96=IUx[ɰ yf !D6--xboɵqpFQU \;`hxhlxdqDT547W3]6G.=0eB?r^o:WA| 3Y>r\J|U"vY]T"QNûOwSw7{x=G*fUyd@r΄ΆZ>꽮w[\-N=P% Wר:bDqyD]fDu˃?飵j߿"J%Lת1כK*=B qnG dM Wp{d1v %HZϬ3~59y(a;A~U-]/IiᘻTX .1 o߀baA*{,Y=u 7y^U9sAժ7nLe^U;ܸpȰڢ?`Y(#/,1Dz/2HKUqU#$qܼ7mocɳ-c1L=]h}w?xdiiQ狏um+~UnΉ}6&TY|ņ]éK7m WٽNJ+v7l@3r+ &cT~uCz˟9~M#3*pt'<<<.CF,R~i4&@֭u0bl"@ѵvZM*4eFDJq"Cl0`U6xZ|[q,V%}t̛7O/ 0j舛W.GYQyD,*`' șD9&F,wru*}1*r'c0W^?[peZ!SؘT|L {)\@ܹflzWZ^ز`$7og-ТǸ|' vo׮<;7/aҨ_cԹ8yI(usK|XH;~pz>]x{6cv}i@@:},ܒoU"KU⌀x!}F؆Zcp=8^Θ:Kܸ?G`zk N}{vE[?-"⤾&a# ھBqp:ҿ7o>:%+7!ШoT,0l|r歹툪5-{UVOZÅ[p\5 w-[4? qZ_HDJ{{ a^dpaU9_}[Zx耋c.o7G %*߿{LK.ܼfAxxfhHP _~E/7_Û5b#"wܨۨ:}!m=.*rKtˬО_Ue7oBpXeodʔ7OgF+6)f… 2wL{ [wvGGLzU:#bCzF6Ʒ&6hte;%–㫪N%)Q@xxg B 39(c=XDGHZy͚54m֭  qNY1lT|IKʕEEP?l_t 90o"TCc|*k΂3=piMԮ]U*(REL&iWF:]UPUw4VqzkrC9}&Yg."wWѱç^%aM!T9$-?5aajHﮄz1_8E&5=-:#:adžWąɜxL-1lmocظ_DڠMa;L`G $J}S1|vnxhҨ[] XZ*¢u[<в{߬P^Cn ,\z'ѳ7>i=, Uم$uUo }kAthN?__-],GOuAanKdX*5+ KPc^ @hD0hBJȈ0d+To7y'BH-Mö [\nBjuѽ`L>? _+nۅ%$G$Hw/]Ї:J6UM>Z*g46HRD\cޅ͸V– y-4yiqkּ9Z5nZ GpNJ~mΙi&OoPF%%T!aoJ9P[*MO5\t9m :%O8zeA>°10mht=*w7g=mqip*Q=֬!n6f&̎h75n"̝;}Ѧ%J̎ī'6bMJp7o $Ξnp{DmF 4wV-mY=|xۉϥUV(?>Fg*hɣ'Ol`ߛ7ac>JSftD.;a_k6ķ]{`ʌhQ#*УtuKtE[\xyE"EPX ɣ'(RHB`&w9Fa6:D@R~pR HȞ=(dm8T@mݿ}^OȩG`Nlkb/SؒB>Ég,F[‰ H"Jk⿭zW#>}|UOܡ _zuG_ц[o5kn7V4Ɩ8fg/`+ FVL^I,reA{'q8:]Ob%pP h"qC"uh>pl?~ʃi|bh R:Vnao\=|Q&$Gk6n JdbsmY|CdqKl >#l0BTe*νQPz#qF|Wի16[jvCUO `5uBj]u>Y.;}&MC+ztxvJO+ rƑOOvdGDPngxO0v@֒%a;p'Q{HV%ٔqM!eysđPVUjɝK}?’Sx@I)Ud`nZ\"eS1hX k6Z}gX捥G (^7g4"cP9N o(vF=l_N"4oe잻4 gvj[7h N%=}cFoH4agk­h4kTKw+ЖG4o` bYlb׉[Ș;W,Ğgq>,7 [܂-.\ D?(;L6+}ܵwŹ0ȐE]8Eg iXrdDF":_صn%nE?s-usMۏ ݉"U _}5|Tk}+6 (<װzL!hUoT/|/._V\Ӈv#bFm]do'̨Y:+®‘wo\kNc?w*U ߫tut?:uوvຂUKf`-GʦwU7jry|N9E.ӗst60`@Wf9|N߽ ]EXhΟ>`vΊn]?Kr++N=؅xT^17^-m(Rui*yJVpzY 0† 0v2=!Gśen}wp? x\ /\;++9c0z^ЭݎNY![ [1nLឧ ~JkGL8g-aRį?DY]joX"k4Vmً;ߣp[G¥a;x=Qf:pa+nغvnQVmdp;v;jU7dW,ؾz9BCn&ġ0a0Q&OӅڬ-(_6 .]>4{6 ]}r Q=qW`bq8}%k&5Gغ A;wo›(a3x6YHx"W.)oE*}lQ{9^<5"2*W/҆_\>FmO`;4+MszeqцNt2eGi{&vn/JTky7j!883g!o߆8+GjSv@xb"pUU?j8= װK188!De|W^Chx.Hao tP>;oܦbp =@d-Y v7+C0s,UpFzUZ4E$z'ƿW̵k>x .jUXm޾~(Je 5b^l;o׾oR[paϿ;yv\y QT|Kկ#ؼa# J{V7oNhFep U+턯 kY0m PW R29ؽs;l݁KSgeW*XJ1\p gOW"j3v9p=׷%C.T.^Pp[lvHZ =%7>+ɫxI*h㭚=v`2l8 W5IW&bp/6mنs});Z}VK jD [{qd(Q3.3͂|0zh?ݹk׭]{irB/=]Q4^-ΞWiv7m#'arDowi1kJW5Ν֍R/TB- 'BOmĪGᕫ8JzxfΏY\qY\8޽z37km`?[u-P0ۺWɣaUT,ϝ7Q͆ai5|^hX/sGpq\|QUQ +;cÑhب1|8sجz2~fUލ2JW@OΜ{wcz?[7oo7O|֬*ܼ~;'0cٸ: GUp8f]Ly-+#6m،[n*x>y^Abj\8x0N=5Vbi&m>ĊSTt.GѱK_t쁒㌲޳] ح"U 8"l߃ׯbcʌN! D8aډ'jzx ͛ʐ~ ֍ ƭKpYڶwp*Xْg|&%V4`*f9"22R/64z4+ہ9y.&wVUs~ 9F:C?lvNpu>haSkƌž=quĨuH2(Vyhv<IpJ2*!OŒό@@ccpLtą~"zY逨FDFcԋ܆!: 'gw8?yĪ BPh8̂>w}C`͒6dYNInػQ*^.npNFvZ}VpZ )’bFtнT@x:DLCԳP:s"=kѾ(PbVMw W񉈊3%+}q^;¶bc-D?0TUԻy@QϜYs?KbuMM#HW) P[ }X!c4P^U]-)L}ad^zBL|\%al>Xe2f X6IhH:o,lQCbo;ñ}#4.fnŬS:g {@{G:ݫᅇ Bv*uun2lprU׊ FPD,։ Q49Θ'Z,ru=<DV}S^qhGWUF=N … pyuU\wʤWzzVQ\1r!= `/p;}D51 [WFh1uv|Q"YA%OSJS^@Z}1MFڬ]877\cd۹ډt󡆈YA4BtT0Bp wFNE@8/mIEFm!{(^\ BhZQkl5Bbxh)Efj(W 7>|AAARAAd"VAAHӈAAR [tޔbAART"hAA8~xˉ'M)D  )N@@[7(HdRAAR D &7%A+  iD  i  BF  A+  iD  is=nEtt4"##bᏡ{ѿANc/AQy=섍 dbRKlxF)%YAxX`<<<{بF ңaQw:8Q/lNe2KO"hAn½(a1QuL@A+^XAG`Jڂ6""AAA'=&L;QAx<}Y7 \G_AxȰ]  BFm|Ek3~z#X{ry f7'A| |>3L>}~1jMJ~\@%ѱ59c-qkdp" N8_l}XOY~YIbnCb&7#Ljh%κs:c->7͆GRˆ|>wؒ: cO0H|~̊=AO/+5ᡄ] %#|{/ ^iӏ&R}ϘKڄ41{kO|XKWi £fmXt%\֜[,7lkǧF?ag?o%β0hghX4.uA?67c^C9S6cMx(Y'&'cCp6˸\R֖#N.n(q@\dd%N7<ٌʙ\AAxtҌuL#w׸rJ'5>b曭ccc ;$ƁajkK\50n-$݊ZVAބ/2B ;&&MoU>2LyN]= 8h Lm[%qYuGƚo~wDi}5`V0}aO3BnC>N0}l۳GI$~\ձUŹ3rCj s{uG-@ay]B?co! N+jKg9kLdg<2!SƬȞ%'g_Su[[1LJk}#Q]Ss#4'TG6\:&G&dapg+LKs! upB]0tƦz_g# gWxg^= oĩé7݈-l0}¢ ],K=5 /iF:xjhtL4~1g"5X%v=K5>Rty[sj·pVpۘ&]>fvqh3cjc+|eޖj:7%Lh]}͈ 7_E7wnvcX{~~k0y]ԅͱ^Įm7/~<#c֯0y{茲8e: Mzo>kg9 :OH_;wǵp˶>0dk);?(.bvN=Z9-U/tD2ԍل{n< ǯ][T^Ctwu[󧧡Ԕp'3f4ٍe WA^,vA{Fmhd~h] п11W+*P|^ZsBе= ?7u96AN}Y8.g zːt'+PyH A$ Z q9)@%_ݛkVB.A x/WD ppK^U`bZ*/遬O>(;m< ownq+=#I\v[L=_оY.\2d{(Gx>{3ӀЮH Ӧ1Bg&t[XaX%L?vSKF.6M<Ĭe-.<&2GHX%Mi}%dOWU8y؜8w>ݯaV/U Y[υybW-tRuw7&zoUƌfs/>29^gs{=Gdǧ%-0'_m),N"{DDžV3<mQv6z>8^3fOF- rfmLx(|oA@p*pmDcv c+B>,i 0 kgLK|D'TBF02fhҎK|ObbiW+iDF1._3"nō{+f~.uaٮu?7lŠ`[:<ZT]g=IaL.Bsqw?qY9#\XTGG7W>g鋿ϞcP-@s_ŀ3\&잉v +!]F#:wDFPB*m[;I;qjKsco[LAJ_ s^L<z]A HgMDm:roGćہg_ߢbaZBc( |c"XAEX @Hp B#~Qŝ@KZf^!GWyDar*p[@럕DȄm~q{3޼`?XE 5DzAJ!AJE#0Qޔ 3^[t)yFUCW;"Uؤðүt\r4l;Nl'bl|aUO6's1we2E0;twM7B}TЍ+{̍ Ap4sk3N׸t[:9K]đS=kÉF@`B⏉<;xgN_of7ϙ0 s׎;kahPoWSA6_t*OXnI s4+C)V=#MV,{Y~`<BL.wT˘U wȗ##9GA|{ hSq/G͊UVhhm4Px:~fQN=4ho7i5[o~Np|D>]!qҌuɐWJ+ܫQZuMn\13(Q WG9NS/xt=2IG;\ w-rmYw-H@|1lTN}=fKЎޫ%O!7g:op'!lF 'u8qt;لm-'vA?7Z@'^1V}Z.~ޝ5׭0߷/>(0ZtHʐC<N?--V*yc׍J {ިFP@D[,Np <&B\߰bODA*}إJuƁ:pc[Dt앨L ~N扬 "&CZU k %G`Kؼy&2f̨o>sz=>10ÖqfTIy7(YYߛZ՘\QKH`.}Fس"co}1˧ѭؽʬ#""WagΜA D+)韼rA6uZX{"Lq~x|rbtVz?p?hojyzTP+-]l{е@苌 ?zX?3ZB^A-\p, #nM aڱJtvdi:!ẎGɆ8y1&\_gCſ/!CB;x%p#E/ڠWQHf#LC~371OqtU%|ޱ>}0b|8quEF71s${u."[==Z|?޵|`DOq#vѰ;lmll`7<Ҍ65.]_5x~<͉ӻw?/b,L-L(]u$re:. _tρ%n97Z֎¤#Qt_̾&=rG_aΒFǠ_`>X޷πѪv |N}ǂu1z4,V-?lLS~ً{Oc8d&s@g1knm4:x {|.8`?н] 5?R ڊEZ|ħȋK7glΝI05cv{#񉵉@˻\w;Ϟ_6p+vėV{<Rz+^4 5k]fȝ(fo<;xVkYSˁȨDznY=t5x2l=r"3"v[U˘_ǺÐ;[fs-"|6alW~#Рd}NLT^9\deyӆq.މE5ۍs>^>>yQ2c86L+ȭ2Ie٢|֨W kG'gBϿCZ~/}̢%ѸYS]?cov-Vɐ?lwG[XDȕc\CӨZ:}9[Z4Kaؼ}-2()0|x-o\A|~ܱ32.;U5 Yk^4f-U)pv4hWj/d Ms0?Luo#"h">iުR;`H s*?Vz2㽦hwgᙢx(v޽n)f_} ЧpIsVq9xLkBZ8g x_)ti6YeƝP3B"YM|gaZ3sQQ92k EY%"Cup oZXدNoXJX|rpb+Ǻlm-x1bZgJ 42J6K2kHCpww8ښQ×ꫯQT 8P -" _/VM`KJ\ꐱf Ȟ>#T1g+?L[Lmu#Tj:XP5N8QVX3^qSajd ?w킐iGD?`?q7_g#p"KbE1l0qT8:2yrPBȝ3/ډ_~ =P769[(diPkaaJYF0аse|c|])z|ݾ@ qr40l!?kfs%bUZ=b=Z-aس}->j =eZAa9sA@dZ#-VC՜!4` =IC~QCR`pws~kQ+k_GmG6M0yeH;YG {`ֵ8|10~' Fڹb±-j|[nݺti3rnxB9mE*rDHH\]]hӽOxfvndFz3\ۄE%2b&< `R̷Lܹ 6& p!w |Ҧ2C\Q[7dZ*mqn]&3FN TyfVѸjTxF]C mT * g/ k|8y=ynh.\t^n)͟iGR9E 9kaJyd΋Y-=*Uadž8{#>툷*U &l/b䒶F#OWSVC8_!}:<*"v^(U$73@F3 *7_p5{ z:"wnP4!Y:x?KlT,H0 1QY:Gш VB/jݖ@80D Tapx㜴Y ID!,, yPDDG`3!?&2D *5!ZPrE+jnArj3a1l^{0gXx,} VbKr^x o dV" 2Wה6[˴U+Oe BbѵM }fŬ B\Ҝ5bZ5#pqY᏷?+G=aޘݲJ=~I![!վj2d~0C;c|oQk`ۻA\9 G:gd,ˡj'PԢ2x!->PpT96*OL>n(\lpCN砽șc'6pRǧ([K(˔GNJM;]sLG*M׈psENmyKBg)a9KUܦ0!sK sDG }{`پӧLs 6J /gTzK)E qLǑ6:\A2iJFܹkC& cN@&OTz*ZKG\J3Mc^'2Jbw7ԙUVŵq Uj+ ]NR.FZ˺T3=9yfB艵-CmE\ 0_+N;O8zN:S /3iFFǚ?m;0V AX\A9? ƀO _Q31qtpvVc-U8nK`{* )=8ތWJ,8%>jaG [H$7e{z}-}%&O { i4#h2fGQdIMU'_s'堤}οJEH^v@Zǰm",; 40-+-$"ЊxL\ C3 [Fd*8y,Ŗ؟bڴp;'䴃KR sck|̛3}?DE Y3z3:}g/ 1$V y=x kWMWÄ.3(^cQ%+4.drs3a% Gӱp.ҥUV BZ$ :7`?"[~lJj磜F߃}ccNeQ'mՊ1;,\Zԭ=N 4s:k8t StDރ0g2>;^bXy=d(6VhgdrΊa9C昸$놅=HK=k9VJ2u *iΨ4>f9eƥJܞ7cp.[,hZؠ ~o7_ gQ/ 16fMP;W, ,  K-hiρjPַ3`E{!|rd/0+R*9^Eo'= 9%^t?&1>z<'=iV튆J#-je]99S`5Oz< T 4F5t8`@QuTٱA Z)(W=7jRyZ~ţ74 ZVAJ4pbѪ &EkBfF(pp ilqU?;JH[- EXq;BT,,2*cE)&s޷  ."C;W]ڦbQc͍ݸ'xP CQy9w $ MﮄpYnqW]վZBV?{|ԱJݹ5(. ddz&놪}9Ƿqn>m:8IY\PqM;q7=D )ſY ݚ(឴G&VxF&Vx0 WKtŐ%76΅/R ay$1KTUKH::W7oDƌ5A^tOOO#9s2dzܾ}ϟ7A&4ԁZ=* ,H47lo zqpp:&Y"VYІȗ/#e܂ )5^LLC\W= "hSr< ڀ\r CcAyݭ[`kkk AB!6A+/ϻ|2+f <=nܸqWQQRŅ-Jv4t AxƈeVg !IZl]\\дZAAZG_͛7cɩB҈AAx7n܈O>0b{<AAxɓ'GNNNhٲ%c"hAsϟÇk )KTTjԨP)RDN Axݻ7f͚Zj! )G<;;1KD <9rƍC%AQzA+at5A!1D >}_~ ::۷۷hذ!bbbPfM-H֭[c۶m2e >S1cƠwzٿO |XtșA /9>>>SfȐ4]tFH9sfdʔxx{{M-TX>}:ʖ-5j믿W_}=0=<<%K(P!."hA^r j+)#=ˇ ,YsƻᆱQT[N&}{ァWZG˙3':+W.͛&L0B_ob4.+V{ХK+Vhvrr믿͛7cΝZ޸qEŜ9s?~)R/_eCQ+Wϟi{ҲeK_`ȑ:=)GN^ʑ#zoŋVh%罔*U ڵ3BAZAPggg-J.Æ 3gh)]((H1ydlٲ?D._}gԩ,X{m>Հ4h@%.˗ע6P4kYR%#ԂuֵPDFFu ]FӧOkAw7nEi?qơ^z:|ٲe5B 3fmӦMüytZ/u6l؀GҥKؾ};;ٳcŊZ;ݻwk.}> iZi p?"hAD@ 0B,PQHKQHGYzȳS @Z%)lΝ GGGm!M#F.O >i2ep$ۅ٬Y3m&wZWfzjwUZɭ[³f.6ӭz:~~M $ BPdQxŅBDKqڶm[N -cipt[`|hM>=?͛[,Ƭ0  hyŔmvܲrkT}I G (...w}Lҹsg<|M# ^{5@?\Bt Ht?LJ"Ot (-tE Ch J|С %7~ΑZ)i! BtI7S)\di~B9E-a*Z)iuB #vXfxP'B1%~x?VBB[k×nxd،k׮}K\ʛ˥/իAx91̦ k ,>AɅJ|4y&2fh C_GO_BqC";+&б7=QrqyϡLkZT|4i}K~@5-OZf@>0] !}VhGm`ƍ0ۥGâup^.:> ?J(ZA!ل~CH}D / ?׮ϖRpX G`#*^vD ɆZ'sNbV!vZv8ڣ -CYĂ2#VAH6²~BɅe3zjBK&t/RtI8f'L۷cZP 4t0]o744TkGa~60F ңaQw:8.VVz%_ p2)phSzEEob֬YF /2"hATR`;v ʕ3BS^{M[9l?#T Bfznnn̈́M AA4"hA/4hի! OZA駟m۶شi"䈠AZjƚ B VAxjpܰ0cM!eA+ <_qϒ%"2ARqir[ )ZA!i׮\CAR S#s7AR Sk )ZA;wk )ZA1x`2 )ZAQti?7o6BA  BF  A+ POwزe ƎkZ( QQQZp)OOƿtxƌ]4?oFh0eL:X{0Ǐ/}̟?9z #;-… п#T"VAxظq#BCCqaܹh=ի舅 "88x޽~~~8}7bڴiWo>}pU\XOʕ?Ӭ@xWQbEx/@ɒ%xb#4u8tԩc?ErI]Xt*XA+ Pl6)vi#.YDQX[~}< ŰU8n߾]c;.6mJL&}Srƴ7nkbOZZkilٲ41~qUdzX_͛[nF=(h~] ׬Yppss鐐m۶aݺuƚrNhf%iHQYXϮ]l2DDDu^PBȗ/ ϝ;gX>w>ĉZ9s/ٳz9)+7˗aq5ƅ ׶9]lp-#T"VAxO0c F!v1DGGk+ѣGɓ'c7 ~onB׭TTI[h-W ɓG[ RXťVZɅMPn]]VըQC JcBN+kSbŊ}ܹs7ߠA-x:ǣo߾: +x ^׿}-V۸ |Μ9: ,xtUWG{?uH"Z[)UƍgVP $wԨQ:5kA[M6ł 8psgz{ڕ0(###q֩YiUwB+4[F^f_nVzMƌS¡^jMf́f~WN{}#jV/lP/K0*,9 XK=/%xt>+< eY\Ξ=kV"X3WnvėYH(*goY Oc۷OOJSLѿ82wB2oڴIV"駟D c56kX+o۶\dI(k5 L˗/kfĉuZYQ ȑ#V>3˗;udu+3{wb(lnѢ8gJg>ph".JDf%j7qf%̍5yiѢEf%zU%L&JRŋͪ"EUf'N0J>"h^j}˚U+36Z|)ܺuK_ԛԝ/VAx)`6-v`ƅܹsC ;m0swѺᡛ{U}V˔)eB 5}lr-j=>Ji-as;-V`EIJ*7ٰaJ(aY'&MhΙ34Çucsw6lذM -'2bm%lB ky[,0ЧjgS?ӛi@k]flJ+W.cםiߩSqKCbB~\gc\$Eb5k(#XuBNvrr뫝L`q͠+Py{܋ZA᥀‚VD >v:- Ḧ́=i  rX* <4&VN>)ƕq/ KZd)+ʎGVQI `bVȺp_h$<)-+ҥ8|q|u5ƉjݗxmeO#0R-%~s'&3OˀZAaҤIZpn:^Z٪V"Bc~Z`Oz)jsQO^o{[G#xR/Z6axv.b/|ft@\MFQO+jƍu:?]hEe:2PB} {\ji_tIk8k#̙30a<Lx-v9GLř((y_vZŢ]vw-t =sWLjxLGckΞ==zDZRbWE7q9#-7NV^v򢵚-GhMwuuտ Ɂϕ!/#&sRunfm5 Dc^{opG Xy󦮡 r@ Fá" Xl.?%œ`}z*XR!> Q&X9K.ta{n"BX>j3n.=uv- aVAxiaeF:i6D $Ї~Ŭ=}A+ "D?X6Ci;.t=6k <݀^vD  i  BF BÔe!%qacʞ3BScƅ{R e#<鴫tƫG4@ B1q ;qDDžpP~`58縥8̖uԀu_^TO x'C Ba?*A Z¡8q㌵9rZuˋ-cn߾LpBߺrRaZ9298ZJ߇ ~pS. 1XaZZL gߢ8D BY8>ηҷo_m 7؛JcrRDr'ࢵcs,v?m4n%ܗ,Y3'`sIXV-=r?E'yٔxeׂ9O<+{3n͛WopRB ',ZdzWΚEQϙp22PZgʑ#ߔPls=.~IY!+B#+"I&zUB9{8\'rRTϩQ۷ogJ f+)18-g5rZZ3)49֬YnB)vVO6͏1BlRŊ•pJ^ٱE39uJqن w_CoB`|9uAW ZO#DxV `!bAnZXr:[Zj)p)D/J.'vxzJSv"^^^w]8ծUO:Wsʥ +eVkib$F׊sݻWH( f(RE+wrI.]Ŭ "hA6"iZZ-liKe%Vr$8SJL,!)nKhmJLr'|V9-fqyZU?Vha+5IxNZyZU0-,A+ v„ z${(HGDAE. ("(wAzH#ݙIhI8/>ٝ;ˋ`b(k A*UbzuDXr.Lc(_z9v1iK.5ףGf l߾2u1š5klٲȝ@+""wYfOxqeɒ\`:rHtYz@Ee+/={h8 ;=Sݳg FF@Lf 0lƌc1C mٲ Г&M2G)S}m:a\'֌Ɨ>כ7[ʝD$EEa"I K8?`ȝLDDDD=qEs [En6I~Xē$k """7`ܸqWXADnZDx;}YEDZDDƵpv """1d=g ;CVDD$839 """ 4vX3VV7o^UDZLj#pIUDZDW ĩSShEDD)::>>>) """nF:;KVDD${1ԭ[~""wH"oGѢEhEDDn@l#k"r'(ЊH@+""^#G٭%[pY^h.\`kŊÛAlܹ"hEDDi"((9sDܹV7V5kV{;Cq~#2d///3)EtL/>#` g„ زevmȒ%vz_b=QOAѣ]Fo9V7 _sJ@+""]6*Uݻ_~%KӧѨQ#s=f0\s <O CMo-q<Ϟ=ki͚5&J*(R{9F<A.Q9ihZr{Eb ZBs|6GTTt K/٭@TpӓDƍ3hѢis?~3u^e͞=ۼv^ϟ9z˖-=2edB7Ȕ)SL-k<_~I3f4Y]3k3yJ}v!S@e#P5O쁌i}bb,1~Ssϐ?/܇?75gR ϰG1C|ú[VZxy|=&7 """TDDΜ9cլYӄ'N0x7W>\^xb2h•7,X`w=ڵxd3ӱo>;w\Lc+S0sLԨQ,Sppt9ZC5M-]Y燇%KafOA0`q}7 J*e9m 6ZaƳ*#&r{o1C+"""wT\u 'N4=p/ DGG_v>Cyz3am۶x{,h quNų4 3g,yp9vX{M'!;x< N\xy5ǭL2渳^6.ARn3\Z6ϛ ZjY"e&\`~~(J hEDD)^Šۋ/1c`ԩxgKu0ZL"֣2\ƾj>cZqߪUfzbYuWM-!Odz9>x|b0̲eo = X/bh:X|nsڍaA^кuk|\Ε+) ~22 {n13̱wرc i1`+4;qEefYGq^ݴi|=˖-3K^ s`*kk|އ=N /{uYPϟ !&=sz~/E\Up3yx?гa>^2CN$,{z=q饾.03%kz GCq7 J @ӓ{ÝEЊ H{~3/cϡ2|VI!x?g\^lS")H 6Ddٟȭ@+""""ɚH!8gpKXO?]6TSl}˩U?ѣ9ȝ@+""1rTN˙' DuO?mfr͓'̙cY=q*TcrZ;IVDD$ $ q֬zj0bӓh"SPreSȞ=׈]v5~%3eI """g|r3`A|5kŋ͌zuEV;CVDD$a},dAU^Ǐǒ%KrJUPIVӦMk8!+{l6Bl-!*T`. hEDD!Nm[|ySaoƅ͔)tpzX_ڄEg"wH2ĉ֮]sÌ3-̸^ ѯ_?^SNk"w$ZR;EVDDD% [Dn?ZIhEDDDB)'*Њ+V`ݺuoK[ӧ5رޒ8cƌ1nݺ[oʔ)Xtx'p̚5 v9gYxc޼y3٤I-n7R[,Xp>9sܟb… 8xy7ۈ ,&Nh\^F~x衇pv<}O|͟'hEDD$ѠAcS ZgLdO;:u6mژ|̓'O~3dp{hԩ/.=[l1!&:W_YffR N}eنm۶Xj ?dVyY/ќ/5yU~0}ibŊn;lٲk" On;w"k֬H.rkljxzI8 ٯ̙3-*U2=0<'g,c… W<[9WN+kaxjժ-7٫L *o=ۄ:zt M4f[ҥqF ˲.gece$jʸ8~a޽裏Legop=LP&^xg!C^xq+n,1ðgO-3{uˢL%C|\ph7fARih>ƍ8yY,Xz}#6WTRŴB1~Z*Fm=LK,i> X1c~XrxB wM/. M:UL38Xɱ_ $ibEa"""rZP^axa;DnZI0 CsFVvQdMVDDDD5Z1̙3/63Xnq_6*[ff 8ի/#7)㔹x ? """b^&: 6حj瘶ʝS^mڽ{7BBBLH䴹0?Yf6ȵ)ЊHLIA&{;9'_~%fY8Ζ3WqJ\ 82¯jq[PG3!C|p'=q]CCCV7E9fCȑ#faFaƌuFp;vi„ 1ǒC6@)S nJ(Њ^zfɓ'ۭPF 3Oô3+{u@m9c=> 1va[F޼yMp3gŊ~4i k}m۶@398s״iԯɌ`Y1t9~nm6mѢE\ ou֭e3ѫj5k˞=y;|I 1%{ɝ4hXAp>}#٨Xgrfb(dhe(d䧟~jfbc- ܹs^zk^"E얛}v3sSۿ[ݥKzA?2{/8WŊj*s433IƩus΍kΝkw;ib+hѢfs/lc@c/ C'i%2C% /gr ߔ0˞fo33,_{Tzejr3eʄ_AT | Tb{uy,ʖ-]vPNsމ0(ЊUL-:F2= {-XXWp]|mPs^l2ӻ`wo߾fFNLڵ3!v˖-ƾHMn\kfyujݺߕee8hk6iР WX΀ǞK2ŷƻk%/bm_eF[`+qx%T4O<& 6mⲦRJf/cн{w)Rnq[z5k{lٲ!88,"mڴfF >SNE^@+"")S u<٫駟ϚUqh.\sA֭l2{ L//.\0ƫλtbӧ+^agFf1i$=^TRQDnZ$_Gʕ {[ O?s٭'sϙԞ={w^1OgϚ6ooot O>)_Li v 9,Ϧ7|kzSQIfjj[YɠXn]SVR{ v22gΌ_=3f4ҥ^ی3LB|l߾ ˗[EnH2r%7N^s׽S!NpLxfkDKVDD$c*{\=yŸ#'((^sc-jǎWp5CNLOuV@+"" ?=;~F2؋9Ο?oz_i„ ^TƚXGL0`=zСC=}3gN3=СYۛxpڲe˚Ǎ=𢴸Ư!^p3qY=x?гa>^O~Ŋ3~*}\Fӧ[oΝ悛^XgLC݄*w#13=z\ezcK#`hQ1 |M}5oSEЊm矛Y8͠@+"""]v?k"7FVDDDD5ZIhEDDLwߙb_3yd>|^58-GaEx{ʔ)13C9SDžfΜݻwkƗ_~iQ|SVйsg,Z2e[š@+"""&rZ\nu`'oŋ7aDfȑ#Tbf+b]O?ŸqKk3ӭo`߾}xyǤ`ȕ+E.@+"""Q wiq ״iST^UV58ײe2^0v<xGuucʕ+VwmԨYWecҐ!Cзo_{zJ,i岃ťRJf˗-yP\93?oC=3ѤI39sL3/Ʒ~ks >F͚5믿ڭ8axVJ.mz} ǡuEWXX+88u ש;\'7ntY?${8z$"wPי3gٱcl:/+YN:.+knǏwY^sBY[ Ů׿*Qi?|+_|%ۭPk]O]k׶oԩ6mkWZn %O=k''Ou+.\hWΜ9]Y4c 󕬰Z`fc׮]['<<ܵo>סCy>njWٳ';zkC㗺:p&g2o2w&}Q="""rMXj3.͟?y?i$3{{{c}믿n;vĉ\{Yzqe)_c ӧ mNO,_#{yαw9YY``:uF仁\K0扥7)zw\0gbe;w.~mlׯ_SސTpc{*+V74N9Ϡxꩧb=܃g}L,dɒ[^|7Pkѡ% r#G4>n ~tӜ2ӫ,^ n_Y ,nL\ӱ:8B\Sr*ǀ5gΜ: C5!6Qf'>?{㋽|=wZ&7= s} qF-[n_;#+G<%tRs[n1gϞm]k_~^K<>=z@<&*/߿?v؁]1駟6ǁaa0z^ƠJΝb86m}]3… c.c(e;G:޽yi!~[>^$u7ŋog0pz6g+~6mdш_8 19/ dJ|y5=]lgPwp\[B-Z3f4m\gP͓'Y#F Qc}`7{p5Ns|0q?˸i=>c\-*faKBhE$ES5?3ik@="1 Xb ֺu㏛^o))Ъ@DDDa,v%Un=nݺ5a6QzzSzN7+k$k """")ЊjԨ#FJ(a&ΠAPzudʔ Auj׮oo5~ >}&Ʌ!XzۭY/^l>cr8вeK3ءC:`7oƔ)SnL.ZAƍN:p|SOj2!ǤT4m &MK/dL"0sL{ ԩʔ)c&,8} 4hu[`A3<3gΘt4P. b-'=AVDDDOLM^N:e-[ 8&e]r%V^?^ Ƕ.;wф 6޻,6o B…s٭p҇إYg^p )ЊU5kC %0drv-Z.svkao(wp)I`O-e eO#GLq|8 J*eĉ1rHEZ*T_bŊH*i6l)M`o&'Y`d'֥PNMܹsgg}^zZ3xw:_״iv&N}tR)88oVJQkjӦ uW^ynڷooѪ_1aaÆfĀܜFQSJ 9]{ٳg-W0f W_}'xy}{1B 5:xK/FmHRrM6; Cφ{ϦMՓvw1d˖^.,, :uY"]tv˭qY8ṗyV$)bX .=e/&{h9sDڴi}AYwemm``r}#Xgc0p_)܏ʕ+O>W\1ӱzdž?f c>\-*fw !+̒E'TNiҤ1˞axuc3m۶)&̦4 """"jy׳BZIhEDDD$YS3[o>>/ d[qmݺ,st^u#?!̎&Ƀǔ)S̤M4[o>_aĈqNcOFҥ2ʝ7oYġ8$'Ώ?،{:t6ÆIҠ@+"""Ȓ%)8!Vh`ȑ#ݚ8K!OhEDDܕ9sfZk׮mr2Y[R [7n܈ݻw%K8a3_Yp=efybʱkVjzBc]}o>d q&ŋk@ٲeQdI콕CVDDD3w}3ӧOGƌ2%kTw)R\P^_|\h٨~= eS){yW\3N7O?5SJ@+"""W0Q eʔ1e 務2ӕ'bg̘azIGiBԄ`裏fӃ̠vZ{{D5Hʠ@+"""W1c^0 eO-N<={4_9lor)4o u#X &`ٲe~3۶oߎ@RZ̙3%l(V_es?1˞[ׯ7eBwa$/ eݻƞYK XǛ>}W|nHvZ3?ŋۭ"PIBBB%Hd. )Њ$qSNEb5MVDD$@jpnhEDD(nd 6&"qSdZ{V=';z뉎Ʈ]5Ӽ\{9N/^4ZI8hEDDD$YSdMVDDDD5/^7GGGZs?гa>^w ۷<*"r.UT(V[S8pJ-ШQ#*T[SNafݎѣ[ .Ƅػwo>ݑ {Ѣb" xwok Ǝ;/_ƒ'OL2 VR ƍO?s[EN))֒~2Ζ- Ⱥ馛nI7TjsIr-[`H&"")m c!"zK7Ni&9s沿;J.7x+V[E$%V$DDV㴷?~aȑnyԩ"")m rsƘ6xW1p@|Gȕ+ K\'")O ޾Ț=;glC/ fG,jEDDD$NI#z 4k\M{2兌3MѼS_dΐ&&: qnvϛkŵMDDDDn$hըBBw9,mgq|}WoFڴi*jBET2>}|S!m43AݏMN>}Rj5O|R#MP*Z$~M8oʕ3]M5PV-{-a*U ERoZ̙1|ӞX1|zhS?|ҩ5^73lj/yr0g7LZi3eGtb tx/f ᑺ /<5Rb۝d͙NI 6m 1WnZgF&Mcǎ{E֭^N(Ԯ];^<ׯӧO[az^9ڵ+fpzVZ'|[Oze]'5]is{peԹsgTRż˴ї_~3fG/^H+[$KZbҗOTÎ?c` gƐ=q2MGŮc-HmݏoV~AX=yl=ѳ׺aaafT 2, |E: JX<[X}C~wةP:}>?m:y+7/z:t杻Q? ,h޼1cF3נA0i$UiL ;wć~ gEͶ+V^̙36jr6%bرYҥ);}vsƍhѢ&hmִܹs1gsc4|rSѵkטR q{1lذݻwm P*$@LxQ4EsFCoBu_N gr J[wd{ olhWDq,9 _+FiS{̩37}l8aQعygD̩q1\Eqz^FmyG` "";v,u٭pcsI1cƘuZ?,w1wz'{d}ope}tԣ 'N0?㘒k4I Vxqhzl $50[:( Ο>`Hd͞'㨋ș!9AbҥXh]ufDXdP. қ+ iBTEdΑaa84֛7X6 CFF#ԁLHǏ^ڄyt~=¿:t~,'272\Œ \_=ج5ILed(bD9"+:S>i^7o}#vo[Wxi5\4#ΣO! A1|_C[B Bąsx3}zv7۝ ]AiVD$ 5èuNw% 22@rdx-i={x ,1:thOTeÆ CϞ=jkEIF1 NA\űRE+}L{Y32z_iXPq2:fL#vW:c#S8F>Ȑ.u?p_QQL@}|ys.w_y;#sht DZ6盜$M6opXR^HơMgy2:t\FM=rY矣ExwQN9slf`M-8}5u(eN/j;{YIIPvTh0\`*?lϾW`z99\>ȑ=0qi3+|S![(>rjcl 2gd]Q8n_u>s%Y5k1!gN|XeF ?=ua9rdqǎ" ~?4 ȑ-#"sNHjU,8`zsv1-l8^,gqm;o޸/ҭZ<܆zm\WE.ڈ=>Mg8m_U4~_y'BxfP^CbZݻ{N'pg#>| ­ŝ+g`-vdh?h^՞닢GipO xIք֬ F.cy~9vkpv7jm,}SW,]KWk.¬ӱ?c]<}fĪM`5ȑ d,۷q[۪e|5ۊV,’ vVl?iK1L1rݏpHnw\,\U5?}^وi3f_8s'.xo<^11*+naw.-wtX;wN^g6}e6i فs!v'qc@H6 %#y!>QNa%n),Yv%l-~۵!:n}/ڃm^z(XKŒa8yVY1w>+i@Z//G msAĿǀAzʓmbmVв*pL@znaF Cfo7QGVZ(WS$ `̸_Q!Z2_œ( m~ݞwVws ?b}b-P~h4cc쟳 {)VBr_K>d C7[+})m^\jFT( boZ(U!~ `]3K7c1/k?Cw |2^Be{N}(p+#ZwF^?DbX)cz/+=dhR2Tz| < g"}0q(l:v2@ru1dlLr_zuFPɋУ#|raP*÷Xi?O:i1zV62e 7oțR$"rkX𚢣]/^t]'Np:}^^U{ aߕ+Ml֝>t-/^veI:b-ۅ<5͖,7-f}khTqY-l}K\}ci}f2^Yo_ڠAWt>y,5VWbUZkt̕/G1k.J5l@)GVwwYa5̅,E]. |^̙3 6٤~m۶kn .tΝ-"R:t5owmݺ۳gOw!ڝ\/uݵuMddLbuV1&g"WZSrZd;.Ǘmj?{4OCf94".oƣujdx}W2oڪ>{b|΢`<Ȟ-;(a6M\{m46V8n.nR"S3W:~,[zwjU+"KڴϐFCE`qqt~~L ۽kaȄj e 3ljqWOG^r1˔Xi=v,ąYw>^ٴS/cۂW_-`ŷ]^ 5atl B9w/7 NqUőˉ[}B@@a~EDT4ϰV.;!oȞ=;l"pGGjj= lrn[1 O b/[[.r{zO2eBɒOED$h=[a O{+c^x{OFNFDF.̴˝)ͻ=ܹKW}>jd;Xz<+mՀVD! LiR"v Wt jc/BQ۳DŽAϕv2ƺEZa-FEg@/.Xaʓ+< ч[DŽq","BOqr??pc":,{"#~X}KLpt\.F^ǯyJ<_{a o+~a}=< / lEtk-?-E'ܽ˄#sZ6z1{֣B٪ a ܗ=r12k4e FaOp|=G< %k"N֭{a(\ ;믿#GED$iJ?+IxޜVp!/Jx*fQTX?K;uK6læb֌Ax$̍LyKͳ-0s Y2 Æ *?jtktY<SHW=&||l'X>x3_O2?WV9rڒ{Y}905UX0pY|(pu_?XjU G6N#y.SFk{ [x/}%}ߖHuO o Gȁ=f\lF;ӄX,·9]sQYE\S̘'[i!p{=>?uRS|lԬ X0wJrX4y{!K+ai65jˊOG/>E͌^Ȕ-r-?DGmQ 7`D*咬߃Z!Y:m9<#ӉpԥسQ+)ehSBLg%]H#32`ÉlDn07ޟ3_Llo}q_ɜX_M tef)9)cxKʂ_@'Rk|0+;,~7;v ˖-ҥK-B1ziر8y.?}vlݺzkdڵZLn̘18s}!HRZñkvmJ4[|,';v`ѢEo[-Zk;w;w6o]Ij}M{&wZj#u )_"O,_|s$88\ [hh<-`/,;e@KXXecԨlٲ駟540,X!!W^rS98xl<.g̘,'8mڴf8ظ<q6*Acϟ'y] _ϟq1?>3FTbNs]$I15""MRe ]֬YM(b˜0.]H"WCjq4h`# ȑ&,UPK,A,Y̙UV[n&4ٳG1a+~3u5{7ڵ3*VaÆv#~ܹsc_ke˖f{ >> ʗ/ 6`4h6mj[oa…v/o޼ xԪU 4C<5j cX2>1v<3A\1EqIrCG b,1q ?ׯ R3hŊ&O&28ٓ6/Yk;k,4kҋ/hgώ |: áq4|ƖY'x3x3{xY#ȟoӦM{3?0>gϞ&P?Y (JR@+""qӧ~3cݺu&:|Iӛ$ C'3iСߖ-[L=ll|N:bỏj֬i/{Bmۆ4iҘasznbf{*<|^. yoGƍѪU+/ z۶m5^g;*`{cóz>Hr@+""q|T8'_pz-ujK`={h=x:.leu{ثꫯ_/loztN4鲠Y7Ӛ|N6Լ̀矣}f4<螢 %/@Z[瓽<͉<yL~R#F|?{DYL%ϓ-[6< ¿I:t9,'رc̱fM0{^pֹ6>1c:FH )0ǺJ*0茭gȋ^x˞ZX n{:905<(bEd/4eo5xݹ8s sҥKpb"Yr7A9W3m41uM0L87GMٽ~ GeE E;sL+' 5W |U"rg%QRb0 En0{@"z^'w/f:rp4jՌ1b{lw~u~Vr\Gpԩcr?z#$w-n?23jC܃EǕ!ۉoc v9H T@ 2Oo/^*j=o+kB/ "ąN2f@=S>WŘu\ Ge "r{p3Ƒb f,3pCDR#ZL]yQzӨߤ+>f"bjT>?.މTv7R(5nE c!Y83Eroo]:VGǽijxSd!4xɞ7Y u=D=ڡxhhMVᾒEQaC< >lٳB+ⅳst7]TVlǼY`]5-_5\_OCvEx>޾Xef.XKWf!f[&1🍘dlؾkA`4X%a1غ?̜ 6Gv=c{)?qϙ9| [X #ϡvןnN4ȳ_ꋹ1m0#˜ kWn_cQZ5{Ym=\,vB,qfdilٺf./"""r݅6^`{>Q$:jډinu',q>'ޟCV ^:Zbn߶xNOcQ4 (x+^2^zmua;օEyQ] YQ]_Pnq?'٧Z!:m0GEb~Qr* T}hv B{#%#itG#p="fqPDD. 61ь@p_^zgO.U) x[7z m=k떐g\اOBhk \Ϗ&>Z C&oDZa(',m *\vA5eDΕO[Aû]kĪ+:Q^W~a|4_8-YQ4!.̕Q#p1VǯU=>@][ݬr]^,"W7o^ڵˌ:x`UDD瘆Wq.e,Ǫr5ɏQ^aY+/*Ϗq57E_:5Ɋo~cڽ>}YA3wHWUXs8'F5icöHFxPaKvtZȕ'ٗA'@R(;1{L^'Ϯ_0 QrزEa챺X<Νs@J/U1dI4V}k25BLJ pꯏ=BO#9gha…Ǝ;'u6˙'WH#Q wVssgp$8sE@{o~˗W=q>|y@Y+gb9?I4B t[!Z_bQd9UD'31r: &'!%dWr I36xm¬-0ou9'?f].S+{ADDęr̉iӦwޱ[ED^ĉ8vz!DDDfh17h/]iƯ&""7g ;|0f͚d1""ǹsPjUT\ j"[%ܣΖ2Z>xeoo>eSĊH¥BoEDn7RYC~-f{"N<^?DeZc!BNτ8(EYAQ!h>VM8 0X ^q68Li]NpڮH+"?#Q<""߃{`r^Br.+:(Qid.ce6 Ng5YE|qVjgƞYhw𧻓^]~1ìSW guyP""""rbFtST=ëgv~hٹ +|uny(9ֹ1:_=ì~+^5 Ļ`DDDDDU'nvzB++ij' MDDDDZ`!yMxءYUDDDDj)Ǐ:tդIE(lȐ!x'?[n2ի';w,/x饗=z?Gڵ~_.󼽽1n8<3hР!XH5ӲeK:t BǎW\9ˏZ`z-ׯϟ/o.b8XBQРyxx]vl۶-BCCX\݈ ̓?nw$x;wߌ30P|(JzK o!I!P{1I! ƬYrJL8QߩS'y5kGbʔ)rNѽpLbӱ{RcQx i>\x ޽{q/_,x7oI&I˔y}Xv-ꫫ7ksۃi(QBV%ol>X%)vtq*Xpt2śey1s)zgϖqΜ9#>ʼn*@SPhA6nwij+;vHd5-oE)SW?ϟr,U&)!!!7 w,|x.}8=NaZLiiiH6pH cǎ:jM^A=3CUw"9A/M/;ytoN~s[Y{P |螵tR(<UV#} 7(,,hB.%<AD_YOK,[qeJ>sL9GbްaCyt#ˁJr ./>8Crd2 AԐrعsʛn7ձޗi1McX+5UwE9rD:8DdX^=YV\C(1Lw{H,^ea >t8q/0=1MeIO2ubzsk~x9 aܦO14sf/$}As=M}BWy;ʑ.G9K]3۸s|9d$Gb~B?QhR`VZo.35s"M6x(h0r`bF>Ҥ|;y6^H9p9/gNܶDXcdX` ='.3f\=cX?G·> @(YBeG!7˼*UJVвx Zޓ/'GaKw|p#f[B+T Q('<> ϴƁs[mi.\X>.700P*kϛrߔq.ip2ԬYS>HJ,)|QZy9`G3LT"3-GWE^I>s9qY?sr- dő(t ih_5wДǑO{XH`wC]*` x}y!s|Yػw\ +}ܼ~N<9q35 %DQ̊qONi<y;iK9ښőiؾf"ʼnHbbr֭hӦ PTmڴiRP8|ݨQdɑRH)̬vky., 6ϛ*K";_sty(h,= šX2Sxa@B 2aa~퉅<]܇x+%c.vsAiKee˖z9zBq?{a5i 9ԩ.]w}W|gw}6?: MeVnaũG2}qFY|djǥ2S0Nn`<43a^<凮/ěqx(v,a۷Ad0^na\}b<cNc2bj` xw K}Yfv+x]lK0t).'‡K|phEcg,ZY6>L\rCyf)(13./7ǖe)œqt+Bsa|j*). )scx휘ŗʹhxys?VSY`BKJ˗cR&|9x0MZ܇Cvgv)vsg9Ae;R6/WUG|(j1b!/"Ǡ;wVhn )y y_؆Kcr+X0`1-^Lb>'CT~wT1bfʌADuLi< ӠPJ%3wf|X);wU-|'nRXmݫW/YpႴxμӧc޼y].z6l,ղc…j _={9sСC_,>peN qx|%Yv<1Y, 1 KLq; ܏a\֟9ޗ0LOq{oBuQe!  [V۶*ܽ|-[ Bxx^{Xm`7n٪P( ĬIICТ][/,[ BxgOMe T%BP(n<混i&;Xi>xn, U(:O`^yEGgǹ̏5ޟM嵧Ɲ(GOsT,ן+n.0?]) "+XwwOt:Ĺ'C'Pr]9HQpsC-KPXi ~R`kMa*N ~P(%ߕ>BT)u>M6nHH>$o -q k6;Qm BQNgn%>\ZvL'ܟo|* "$]$Ibϝ}8ӜNnOe% B@g!ʖ#Z˗/XTqn+Qk.NGEB'"~Rx5x#Pz9y1BP,! E]ҭG-!Aݺuo[nr9uf93M߿lݶmFޢE 1AT aTtvC<6Tb:F(P>>hVOl h./-l hRK E}m "?W(aG=}ǎ] 3{VbpKhѣcTT/%Dq;4_n-!KL!tl!A)\OQ`8eK~ݱrJmzܹsQreL8 v*VZ]_iG7n,rX`T 竰Μ9S &RPժU-[~~6>=1 ..KN1q^1m~-M0qƏ 6e|A.'{-k{%h}6}=Ne'4/С=>b\Gwb;}оC0l1%E`'/Kt~|\Na7n5_~㾙j .-+L8KҗOg엟q2S|\|4}Kxk=ac2y/ Ez;낅3/t|T_8e2ge?iDqD xڿK6+W^숞} j<6cxKxwe="=qfPD4|8]w' ~v"z/"zVlgJ,Hk[SZbr뺥s֛Q0ߕ-9=.}0֣;Xye)e5жuK]ۼ1J:Xt)J*%k2qN6m믿jbvl Cܮ;J(G̢)]ڠБʌ8zNa_7L] q:~ 4; 3 UQ R[t ^>#U]7!(h 1Qw[BGxӱcGMHڕ+W[oi-7"7iT *UTKy4kZ`E[ꅺjEZzRsqqъ+-SZie47/\ Z6ajϖ?kBشjiEKjJժ6 fՃ2ehh^޾Z -88X )y{yk3V|=ҥKiռ<ݵ-ikgܼ5jȩH@EMk H"Zu-[5aZB!Z]zg(P+yEք(O>K XL+Yy`7`NZ_/PPVp14''gxZŴmް앢yZF5h!Zٲe4O L9#B˄j $V"O+Z(@Pp־ǖ׳eTG+^!h]:5ռBאq_=5jEa-D܃2Kh^o Mi  HF;˭in>e}9_~(q m脿ϟ' FǵE4/B Z…&VD)-Tq4HF<ahh)7@+YV|QK[R+YVu7K,Mշ*TPSj>P!m҄I5/moTH+Vivh=&ttx7ĵ҂Ļ(;[?~NB]ݵ ĉ |םq?}zkWezհ}խjӰySQ}~ZI>O-v1Oz{[/.'~35lu5r<1|oHKKΝ;]puZx-22R!uvwyU-[jݺeMH85Qf|:;XrpG  8t$/&`̀WDÿˈM np9olCFM36o{Gy.DA *l;Rp%) ^y;'D['@3+VbQ&}kyNpHDgޖN` c ݳ'=o1E.]Dro ơPrhڴ*yg_V =+ѽ1oRr{QWwpA;O'~6NYj~3IF@P4i*4o|^ZGGݯN5:M,`Q3hxY&,gnq1O::5%0.T;X"߅ٮʮyk ~GblS0 ,5,r&5%:B!WlJHO@rR2>7\n/f#W(2!r.ظ\ - %:=!Úutbt:|>"GΠCwP!R {'1eIJ:XN:R+gї,1Z&mg{CZICrrHٚdNJr"^}s0|;]$[ؼ#;X< 8T zY.k6l\}>a^~ o?gGW/+$ii(]1J  ٹv ƌ _}q&ý}}'gWL},Z%* ̊\] R=4p49.oP7- ^! wp(/qz`VYR9ym34hjW p)&C N1Q73?~r~b=I`< b#rOJԾ=TQ݇ ݍH>hdC %mMiBTu2,'OƷ=ASϏB!xA, RE8ˇb8rD.5Tb[KOݺzk-4sj)PXHXb˱YۜueZs^xM׵DRp2u>~Fs[Y 1HH̴Ν6XxCض6nĶ%6pc`|spnE7:/ }ۭusxef_|Zɵ83"-W%=Ts(lfGވKl[6eJA(]&L_ gG{dm?ݲF >  å>(v'ho'_<^{⒭ RqԵsxqۼbn[n%l ۬ZV DaCfn<[MLK0 do4>9mdw^¼M}[n|y謙ɓ'Ӗ6?/?t gqF涶7 r*vKC"We5N.Oc|/>vYFkw?NB-`/g#^j֪^z'[)ū7Ʒ&/Ĉa`0A&8.2'o yŖX$JWkÐpf D'>א"Wǜ\D!G5 W4p ןQ$<$IIM%$dff7 -eˡUAĞxWWx^ èIŵ~n[v7V/][7?n<{,?]-Vqԓuxyz^ ,D |i$Bcv4qmb+<Ool@xj?",> O^<&[|3g >>OMf ls >L<W7SD3:tuڷo]k kJШQ#9awf͚モ;OǴEY`s:f Q2 /a?A\_pb$uՕiI(_艞={G7wP8~5G̽X7l ;#Zw芢j;82;x2J/a&,~,ձ+T ZDC v{r]=Rg~n&a2PvMKv֜; Rxkشc"",[b@^,zժrGk1Լ 7ƛIʂNyR 2 %i؋WCR6Xu1pD7’7^9`϶mi PU<5C-p鼁?{ˉ_zhmJqW\&ѯDg XX'_WaeC9?DֻqSd/|ra&nmCzt@Уg/<Ӣ)~Z i1߾P2XX=}ж^9Z6fMN4 E N.w0h'H@ ^a,cЭF:լbS np[UXQxsl4 ]`y38ѼysYxm԰Fh߬ 4GwEE--{ڤBK+2^g{'ܷ XsD߶go,J^޾xFS< 9!ӽUAɢD,^Zod0OCV,7G)/>NyX>ٱz&DF~(?=  CM9i"-aC ?{xqE1OH!2N{Њ(UXI֭殅kJV_Hq慿hZ̵ͫOTwlm_֊Muܶ쯟Jk>?|S>YXK+\t]ټHT܆.xzzjO{Y;q)Q0h9iϥw-4WG[/kZ)-HEֶ͚0ϘkJuMK 63ckήV*Uuz H,W||CvE+S8@~2.v7C@~& _{ZBܜZvOXyXvRe{οuDՌ6g+_SNn.NZ#5Sys4/E\X- szN\o譹oD\'!0gE=b\N/JhZvM4@-G+>~Z{~%'z^+Q2TT|pV4v*ڍ?h.ջ] F#L"@"w{v},NW_w?0{9Ն~6Qٯ]͟?_[liڷK6gX . -YB,,kyK~}?RpYYTxߴbhCғl|#q$,rꡛ}O!|E8d鿑;Asg_FPvϩ1Fp.'.Gxdʔ/;i8~ T+7LH \пSSRbEY}#:qLdВ7dEwn&sCqpE-!;وT([`k/."C_GΝ1N^NB{Sj<;g>o]IN?TFswra-Q\CxaիX6Z&jl%;ʦLngUxnת`xʕ+o8ú,*eUb+(*T[JVJBPE*S>;լ$UZnt%e+VNTIs/ =oQ%eeլ7ߠ,JrD9*1:eU[Q%KTTI2e*$JX2(?~ XF?I}uv ugJ'QU ]pª.N+rA250IXj5^#>=3f^5KhPpxj$w-BCBgqkDq=<+bϬP( ENVBP(^*X{ǠK/$G/(dƞŀF`| QBa'."R};C8q9eKCZ'5-w=5-M;_#T[W$88:!>!&Na' lm+sʧ~ .`Ȑ!ҥ 'H8|[Gᗅ-+7g.:0B$Yܮ%Fc uSQzcjZi1rtOawLC , OKp5^6:IӘW{<@z~{b'aر8zQJ'5,̲ &}4qfar]'|t$'%"*<%+暤𳧐broOX~+\\{[?>3^8^LgqtL<#.^uϙWLHJIE97pD'([b3ldMh Gk?}Q<<` ì%E?R'Ɉ8 ÖelT._`=G k>s} kftl%ܒp>,VסO"%9J{#6:j4ĢkѦ~I,[ۼ1"b x|@Ƞ n'I }EL 1WA 6i}"h(i ;C'HIq#nq-+/6-Yd"pt{Pq4STG `cpx ; 3gQ+BC:E!ɗL*ux,Z?BcnTh>/?4Y=SX`.Ļcðu`^R.E͆ S<*,8M:An0؈B3_8$۠J٬4}B3U5k>%&-Kb^p"c⚆rUfؼaiH3&&Ń|{NdV )0qo<) !xI`/*!!O{VES|?u/Y*L"Lfx{zlՊHKD9|oPxgGD=-F99 mr%푩nvh]]5x<-<X%H؁ L=%-[w5j^:ǏǞ={cYBm `kcҨ9%2X*RUkͫ9P(iPx-RRb.WvK-L-!(~}{<ܼPvɒQ]L *sprJ+,[aH9v(W^.-8SV L9+Z4S5(kbE8bQF,ZqB H7ݸeĻu+V,D>&''vV8yDU^6F-PS>}fy;xYh'p⊆ }'ET±qy-V 6/I_n=Qd"[^.6~~##)'Wpr 1'aY2g?L_mڴPdb5PŪmWP Wp+Kkq17hgtMvLP>wGG`vZh(S(͙( '"4-aDUQ%bAn;'XDUP(~TXK4EXCnl`lW舫BP(~TX_P&$5uh8% 8UP(y&GV)sir:pi W)* τ5>Eao_!A?%;R͟h) BQ3aIJvtH}#JP( gjM\f,߯Dd"0~e\Od`Ѿkտ7]BP( y&-N}mСQDX&6x[xMMoǵBP(2y&:`f[pUVBP<,䙰zBfdRH-+HL܄* B0gZ׀sV:]$9IzhR( a O;/;gW/#z5P{4T VP(<VW[N]!&zJX BJZA '-R3LԐQm7a&7% Bxsa%[ NEB,P1؈E BP("y`,) a&߅UP(G %={XnӧOc…53;wIJe˰`KQX1R3zh3`̙3DzVph׮vmYS(;JXիW,>.\mY3SF ŋc֭磏>,=Çs=x :j&66~ UV>)Qz,ѸqctQšyS:$v؁{ ƍn`iݻw| z)[wY.׭[W'&&bРApqq:u=zH{'xbԪUv*y|kVZ֭[ҥ ^}U)z:-[D^`ggg 1gariӦrse'N<'xgϖ:'Oƙ3g8f矖-O?-/ޡCy6m$u>C~͚5OVZaذar_~;u5k-Zm/_FFо}{n 4h@0T[W_}%;Oeѣ2#<^^k(͛ EFFF&2b-!&Jn~Kn,1 r.2pߖ:%KsO.Ԟ}Y_~r=Ϩ KW)8;;9!BlO>D3LwckkkYʜ9s4!PrYO[ 0@^s7xC[r\vww5NDB{饗rPPpߵkj+b 5v5sQP >}[@@^ rY }9߼y& r9;ǚzi‡ 4lP;|\s0**굍5J[f\V(w0jk˖-:\Xv^-<)x;(sر ùs"Bd6OOO9岎lkԭI:խ*Zv8~\֏ID.dJ DrU.%uƏ/ï2bŊru(-RZo ǧ!ܘ6mʔ)#D^˖-[ M4U:i[0VuB r/Qe (ҥKr=33/\fN/.ׅ^×_~\+W{c 5kU&<<}ȶCN𒘘9dlMBB뢷m6 ˗/묮8ʓͬ#<%%¢P\) & "K_F aׯFq﮶̝;^^^XdYMKp0? ;:hS)vaU'sY`A+Hxx9d{xgȑ#(υkᾬk6 ŝB4kɘ!(;{>gYPTih}|eKv_W&'DEN UՎa-744raUzBw j,!2qT+g+yUFN$乲;jB"E5k&_ǀ:ōX#*%7ZJT<V:ޯ_Qb๙4'S^k8Ԉ-'* !τ5>ESVQe?{?gt fRwGP(<֣4ڦ DQQ52>UP(y&6Hi 8; BPLҮˬ YCj_BP( Vdc&}<ʖO B(䙰fޤs/?y:+ !!τfN)2~ e* 'τlA0 g\rcMDWP(y&vei׋%9 q)* τT-lγuڦ+ft [OkC/aBP( *yjlO=rI ĵv1k:r# E\BP(&E(%=av5Ι[L{i(T+ Bo&#\25RpyF B(診XBP(|\D%Y "`_zF&\_+a'(^Ζ5B?bD~&UU+ EzVZL&[+*D"!!!'V1t ŝ.`tzzebY*8Q׮b|,vx~JG&% &9Iك#&pr)|_eZZxxe؉ه-kײf&ąi Ѹ{e H GJt8bNIa0{wiR}| F4\O'YC-2Dۊs-kf",]5P,YKz #w^7ַs)99Y[g?OC EVDXCBBtWSpp%e)w|\4 ?oK/|  ×g5|)`8<}dXg/M%/_7/3g^|EMအ#dF+Ē\Jr{Lt,~ $w z;@O \]\Br=;ǟ7)6vƮ_D!o-rUh^6Obc8m(oPOd8c&n…(' )= uBި4q%Q(s*YӲ/ qzTd$cVd<;)8/2lz8(d"c@j\}Q\2af`ib!3llGI8/UlbYEw(85h@.9rvvvR Y8m:t3~L7?kY/ݸPX%|&,QrPd/20$e''G3)prBRn(.׫GR"( VdjU {9Qt)"(0 K سlG]t9~kQҢ)^H?k(_ 5_vx)VJ/& Q{ _aѮS(&S9)fY}Girb*+_]:3Q1/aM"r_;kiوtz|!/wY\k2AP-у3GE-~~N/U{NW .l HGh;suūekl^ \] AuGʰwD&TXEr5nժ|g/_,[ٳG[8v *QbqhhPo.{9sJj2mBѵfEZ"Jv#x.Wb Q/n(n;>}:K?"r8TؼR>q=/}2#[\Zm\e-7ۛZշbe*h6>k{? [D˂_g$̂z\ RlsWWlso{) m"Q_;C4,`]f  EB7wriP<5瓛UP=-Mlb+ BpoaY3` Ŵ[,+ &τn Z BPD kn=+j2ZBP(<ܚv\jO~P( E%τ/f:ىiS!_P:@ c'~cYhL%F[4 i Q5B5y&$% ha>^manN2$#SCL7ǂ'\ɼxKF5bb-cX7eptY=M.[} ;{S8zA F]Up@s[bJL"lhkBT7Pz]E/;K~k.9c;}':Eaq{Ln ʞ}0hGشu%3a xr5kրAX| 'rh2=~k7lc{#ľ0/-SNE-kU?c=yt{~y*g G|!.l'l\esf 9έ6UlFL}ֱ¬=;y]{YB'Z$@JT\ >!>Cٹxua_[ "tihD-!&Jn~Klv8dYM7^POЎgυ|pwwx>RRRګt-טm ֟9Q7F?F(D 50.l1E=}PthR,1)ɘjd_"ޘܶ6.88X|fDߓ0;ZM5zaLV (犸tqkbªc8x!NoZ/.ǿ\:%}**vǢMILj6Q![Ĺ3m侟{.!1-U,!Ei=' Gâ~8])J}Kgcѩj=+RUo oӷ2iҺ ڋcivUP(PۤkzR++P:@L"4l9iBaA%&6ޞfs50b~HKuȰm+zOy:a0$wsUDbj J{|:RБq?bv2O~>3IS~ai)S ;#ZU wRT3MңS/')T<`^g,m_zSk>g/V)`~3px]+7qMujt(u*X"HJVz% E#υ5xzo,rQhX.rاyas.iٿ0qZ޳aa5kUCq+2a+4p܄ͧLTV5UP(M 峾,P\-/2qJr&s/"2* IPBP<䙰z:zBhDF5zQ&gȚ WgȹBP($τeVz F\լqvP6 l#, BxnCB f'302qyLH P:v ֤* * BA|tKqEig}[ rHRR2i&z{6k5P(*3 6T.dSHR5 ei)-J8[UBP<买{[j7?pqe.n Bxaձ1%(ekM BPzk( Azo_݇4|)!Nf͢#{n#cÖ5mۄұP?|LEo 1HJ6:Qlr:-'#j>>äq_x|v1f݂ȰqrC5/g{kf8uٲ&Ӷp%2ҲP(6JX8xyoY\s ! % -F'J"5y?oC q `7ݰLb.7 ㅙ d*k(6V\UR[_LLë?nABj'7eAM̴ foe]|?4:)IKM/uxڤdӿEtr&nZ0ɴYlΟ) Ń;$3$DD\ c4/U6^XrQ\TšncpVdwqM|e||d [<_{/W#)'~o2oRU-Fˀ碓P(b¿lg6vBju=Q?9(mv(Bqe<_O ;Q s¶cQdNGT\ٲP(6JXg'!jQC.GjoZ &g ˴7V8(ׇTa*bSeXbz8FW7& KSzux]3!5E)U/'mw.I/ԙ35'Q\\_,9'cg *U6b>rOTqo-ۤv[cZu)㏑͞7m_EZMdɞv`Ͼ5BxP`YҠ[C2|qqq(ZLq2i:}`'ڔ"KQndJۧ,=-B+*u7U*^s$ ;wAu,! šŭIӧx3<8(;{ܒ羂fߝ+]kORŬSc~+yDNiv6F\KBF 3W|B= ^;8W( QF k~"@P(*8HHJ5 Bq0TUjcU( "Qm BPŚO$&PbG( ŝ ^EQU$Dp+ m#pGw/o{ȊX1<=/hƀt vb!nrx='H?J BR,9MgVu;&lş&_s*f'.-[L>0gT kQJ\\=]e+VE$8;d6f ֔kC) ŝ@aMHJ80qYLipFP yagGqXi~\&Wr͟B!apBY$YEOa`8q1NC cى-÷6b[ޞ~+m@xVqN6^}BZlKb,:zM,d50MqO<ч!C 0O!ֈ"J.hTSw _BR-oIBwlo~1I-ÅxqZ|ؾ};=-֍|91XaTپq®|gQb_PxdAP<Qi*&c:9Y,@(!...pvve݊jcJ-Wʔ-k F-6ފEܙH9;Ǡ\Ѽ r׆]Ň#!`s AZF&R %IhBxȡR4([W pm;J(#l ;XRJȰĸ3Zݧe)+NHnHIw-ϼ@^refP\-"3#bbWi[;ibYej* ?侶V\џƋ<|+17L|8Co3m6mV ek5C  EcGi!=o `c;"% ?f-XjP%~nsaΨV$Z 8z6NY-YL):vZMbQꝖe䷺D Jᙦ5X#~'K; "mLiYP(s?+$MXOkzX2t\hgĴMax5⺰A- S`s9 a?U{4q B!IXI*"şcoE񧸆ƝݼvջwkMP<&{'D%[ m0nWX)6]Mc|zjG(_/5dwy= Ń5::ZADn~C__ª:/= Rie+g3sلa38 Ūd[AQ=au'&^oL$7rswہǹשP |O8|G6lEU0|ibئSp? <ѣG9|"Z.||)qd_Ó;\/9pcdGrχak6޽T(tcwQꃆ{#K#?XN{2s|?_5 \=0a rx݁ ֗T1ހq+‚Bd7`J#689݀qw3bQĕ{i̛7O)L)))RN<:s"P/"sN+m={Dnݮ ,h׮\3ŋرc9P(oZ~ruSF47o:_5<{5Xlѷ~\8D8 Y8i&ĆXd]QQFתlbARH0iiTh0tbGXK/ס''5g)*Qsn] Y%r_>R踸8ٶٲeK>{3aeZ_|A:z.¬"9LS6#;<͎PonQHZii\ )(r3 q'"_\k"A%ay1duq'GN7 q~@qտ+͍he{~JT:JX% PP%JX֛{ U7tQlo ^'nAP(yX;Xs 3,,G's5FNLLFPM EFYyXWŞ-Т84lk4TL_Z2vh!|a~Y|secMn?~;BqQBqXOdsa:9%;vnw+xA,L0W)AƵ>u7Nn:s߯kҵ… s-܇6m$ +bBf1?^BxPAq 2ŋKAl;>..jfƐF ؋miGD|rc-KQvCOB 0P,F--Kׄc®S0^xOrܟ={V 3gNc1'BC~:`!ӧLl^z8BݺuѤI\rE*(xJs+.u!$xo~NtlE~',\`cgmV(pޒ/zٰ$: ? p8p ΞK1sH8.2QX1z6UDbt HtjRBQ%—zȐ!r~MCe5._'&O,8r* ]ZiZiu>}:~G(QBOoIOGxg-])g~*S_xԬYS:PhNq`a…'sc ^=@QY@6"iѢEk5ji$R-Z]($L8z S}ZxJ'\S GxO? rJG?^8D?W=-dZc%9sn}/P |wy y#FNJXybCD^: G4=GRhX;89&mqI4^LU &+"`=tabCk$)Z6kd_ऋ!ᲾND_Q:zX8tun^kӗ}׉yq ţ3^'Nmsh?َ}eq[~bAvJBPdE kYZԩSuj:0nU*&nt+UP(ףWq4զ݅e˷cY&\SvCBP9JXr(M{A'D Тy3$dG,r%thgs{r~rA׮A k#{YO&?S!?geKb&g Y{es6*+n9mcqH=s wֽ+ K]LO モ*y 3Ř;wN:D}U\/cC-!0T#-EBEXot-~fl uH^f]Nb6ڶtn&+oX1ȤH)SF򺭅KOܮ,2gO:E~AH_~e|GSݻs}::n:Gd׮?#oz c'sWUm@M?ۈLhݿp0ϖw83ik4l;!]a48$ŋ -("\EܾfU.N:%]1@BG|v))tYHtAt"uz[?a:# M>۵k'A2= /} ӡDR*;wiӦLå : AGԈ^@N0A0:qxtHvơ wG␒#FB1s~tɂb{y޻\qXGQ߱* UVf[":6p&kֿׁ0eݡ}?qpl?3B3`xk BO]2`i o!|Bp'v';&%F|>cF2fQࣶ&,;idjke3YzeH #Ŗ cS۶me/}!¥(=sE =B;Ӡw+d9 Xy^'Obڵ0zŔջ,r$"XҢ)~Z 'nEp}?[Vrx9 1ѷBːPxl0e8:1ϋ@x0 8z:p;s:^b8fbf6ּ\~*a'>g5DUQ-"U?}ǝD)i4j&f\,0bVӢ@fgCJWQš(a-`<(ʕtl< N|"(̌LT&Eg˽L= 03):RTdG kޣ+Kh+^, ``nEUP{=%~C Da7tQC;ѤP(Qª sҟ`=/q+]rV.uU2l"{,^4:qnd{VY.DnZٿ%V^ EAE #->ŊʕEھHIEV^htOq-PThQ\J#o3 Z3-o-j^~>Ivc1nNqOo̽WqŭrccsS;c3PT>BP4؞F|$ /h""b~!~p~E-CF6)Qdbn]Fx8/" W$'Mwݻwx~d9~sO_礯{V=.aFߋ_|Q:=]Xn$ohGx1t0].scZ!sVkw4 c%H.ϢQb=9HNvbu"E"xLp7JT7{;BQPO#3Æa23,^&AT_Z*8#)i||m9ARAV\U/1?lqքs"4h VZU:`0R(jeȐ![S?pԩ4i\;A_1cd:t5k֔wtIz4/ӱ"##eOsn$TDfxǎpt8&~3g7JwtEHOL >\1?pFA/!HbESda~٘$3  yq!J - "J2at؋Ktq<_kNp*O<6Na5]U+ *JX1#9EA+%>&+VVDhN0e8YWϥ D΁h5Pëu[PJuo`BbH?|b,E0C֭VVRt|tzOo߾x֭C6mPV-鱈oi92~˖-zFPшq(tNXtfO*E '(־}Âv%w$:ӟ2e^ OItH 4jH#& OUtU eԀBlt[y`!Ft5#vc`u0!ogd1Ä ҜWz` <&sBת^% NdZ9e\YW55!2:e: <[vLYc@B*PGCR)/V1¦x,_Ph=CRwG) )=F C[ 1ZRsᤓ=Ά ;H=ҧ%IA.01"EH1g(m6ym<6}F߶rNuh@Pg@RM{ y07>^M@_-fHAu![NjQ"Dl8EUءba{'4cx.ת9=c`EAD=ڤiS|$,":nyeCiRaMݓpw]O?i 3+1<[UY\?Q*-&.DQfe;ÇWbE郗ö E)Eլw/_##Zւ8YcO>ǠŌ?'/Gr: JhZtWȶDmhs^E=>}:TrrFc1h-$GJ!1|e% h]lTꗰ)h[Ka@bpA@[x8!B~c֢ʚr:gwE}c]dC `B(h(ă B4{g~BlIMl}+: ][psąK{`lqKТ9! 48yDA%W"@ÎSx:OXs&ퟌzk`k`~i>3c !Ŷr25s縩 6 8z+iMnٲEj_CʱEXq3}8L#(ܖCx71yd.;"e{.Qw؁zIc}6ń,TpP2(+WH)tۙt-n$Du5 ʰs3L^DoD _Q2\QNftRX%cF~ٟ7^+;Rn+%k}TsD- B k> + y#+!̫\kp6Zh)a17sܮg2u1v#L={|Su3p9J!\tc2aD?~?ȞB.P\)(8E9b8ga:D_?'ZJZ>l9^#7]GNgGiG%yƃ*7woEPA &gn2wj~B<*_> _Xk~PnG %ף5QZ(J(Fv"+|b*%yO~ _Gtqq B3JXW5b׉H{mM kQ tɣP(P*#ͽm;M0[3;uopm MBS*`g4NXBy,:وyv+z;22Lry;r4WX`~bbc'BIg&9I8sGP(%Ig2HKOH Meu(A( i,#V,qY\(/Q8]4FD&u!+ZS (C ~;rүHki~ 7`NV*}4z9׭K9Q(D " 416s7;"E)}ΆO('bfWoI=װֈLK޾s 3`1ք~+BӀQCJ}„ק٠Fq @z&l5 meBшtq ]4$)Laˉ*W?S0fYLQ(D " & hKIhɀVX'kf>$8 \UH N%ZB|4D&.|nfa>Mi !3wb~'cVﳕx !:ly\[N˗?.&9#¬pBK*`{Fu r6ɘ-;may.=]sBA8g7P3KP߄q0Y{ԈP[}Ι J߳1@ !s =L%D$,%"e: %vUѿ08 B(aUdRcog ;ar:::ɎE&0 ]2-|SX+P]CyaYҍ^?wkboB .2=&*&m1`H 4!~:n jX'KٓK5MAXםRHӄr B(aUd!#SCJ&,F b(2a9fdsa&^i5WP( * jdj!ǩZp&v`^f( |@sj(PF.]&Q8G R`90>ٱq$JT OT_d;,hfVB(_y'Wlo:gZ"+ :*1?`,,[6]L3Mӱp $$C B񨢄Uq{{{3ڶ톖B˖]$-,"MX G_׋P=oT|j}N۩L3{9c$?>Xz%<#wǒ5U(F #~~/NOX;E$_q^9 Q=(17L?BT[Os/7>EXș| P,OCk֬FB 0OOO)hחb{OM4n)=-줥iy]TEGU_ n~%|mў-ob2uqqڵk1o޼Bqk>b𻭄t|E+2N\QψF$1'J@T(7 ADº1ۅC|}R04:)<)lU;3vf.iY%''KUMZ6l x@G3f ;&EC͜H#i-<\viӦMѶm[lR;(oU*"MzGS==g9˩pʁ. E# "JTR6 h޼2;y}3rgi;.<qpy6/>^Vdm=Tƻ 簓ҠqCOfOĴ&Lp{Xo۶m|رCygo߾\ZZZ- J&vZbitڄ/P}]䇫.{, Q=  ak&w言fu3$P E!cܵ&8~T> 5iD̓* a0t?qJ5lP0 իr|Xuj;5@6fyIpRRA)BAj:rHddd >>W\qЩSbSSNU 9pnJ6uOpODc sqQ=v+vTjS3Fy={r<̻vZZ_z䥓:+L8)Vvsf_s3ݍ-Gn"NЏШcHk_ѭ>qaĢ}9|V-LxSy6$^<|tk2F7p Éq?ݢq!#xJ~v=gff*xP0<:-0q9?|IIձb:GV. rp߰aƌ={;|ZWKe5IREҐďƁsċ5+BR d,=q- %#<>k|F[s[‘sRxXx+.O-GduBu:-tC#)hELHlv3fuci/N9!IXI㛍Wwn44pl@婯0g+e1ᖌp?]Qv7(3%?*#?I؋>OdY^6j4 \הylIKKĥu>o-r%a_M AXTkF Ztz&t=?jCzѤ0G@h@}ۃx`rr .qd\~_x#pβa,4 U,0/-DJV\Bum*հt/,7ъ9\,6˓I`;ˏWqIqpy*]9ׇֹt'O: Nm;MeNçb$yL3aBiPQ-Ŋ%}G_Nr$)3+L\PNJw! ׉?>, cٝHeSzI!|R(rd"8|ޭכR.'z$ߛقGCq*__*RA4jmoUzij#Ty-K9ݏ!JkcSrԘb71u%A0k=pC:0Y)2yfiw+nذP6 'XC;s8m/V &4B8%pQ'b/Zk}ulwpå j[|Ȅu, -`U-pƙ__c)W5 (W )gz~Iqmζ+Mcr ab]yf7%|kx@s6/ҥ/|+2lsScܢB9!ImVe_F@p4k՘ʯ߈.F3ɂ\R8y/iĔ4oKU(] b+_lv>\g0YJhM e&^XJb%kߙqEZ՝&LMjZd᳤k8_}E⛰؅73iAoHu~"%\nxZ'a€3Vԟ9"$r2=[M6 Jbq S]ۇ_ۊ)f ?×qx4'V69{»ā?ס̀Ǣ>ΰՓn\|JQ#/U0ULZpjdx׹n|R+l B+MhV a쪥+ qC%@J@E/;I7i :Tĸ}KT+&^u2>_+x8)B':,evONdOMjY\]VCJLSVUܿUv68g)>N|JZT! na沃|DK%[ʏbGf(xVq\hJBfK|—VI`-{iV0Uرe˅#/X Xji*`-{iV0UTFyqji$V/Le/ V٢>5k .**R&+M-\TZ(h^e/ VB5#Í"!!k~_x7s"++SD~M IKuZŲ٬qQ/?ݺ==$ǠWtqG—N4TKsE+99ܫe08.7ϛ! ='^ZMLlyf\ NZa0ur0/zSKI p-V;v(uN @sʸy?@-3… ?S WBFh,X@h< k׮_ "ak%:gKT& jׄQj\%8mBB^̙3GuR&u\7Qa; _k|X8c˖-j=z 2j٘SDo3b36i0܈#P~}u &:dyϡCKMMEm#-hHyf6~dYIsC% /\A Yf1oٿo^vvJ;q׫i*-ꫯVĊ-Zuԩ/T~g0???t<䓘1cv7r\rW_ŶmT)S`ŊasrrT~ŷ~qpժl`d"LXMc|$+offLP0|U?u-Aq*&MT1+{:24h*li7|3RRR`ؾ}{o.KCu'BOHt|,ܹs2y'0n8K.DA[oŋ/#7Bv m۶ɓUžP'|F*kj[.6l^xA9HE4(1ї aDڽ{wjJA!LTHH:Lhܸ޷o XYS5RР{Y ;M#J?qLΌ- v73?t* J]. AÀ.gOieb,Ϛ5Kba7:: >D+( [e^x,ɰl40_<_llpݴ[nU]}QdznjC}\#tC|[o%zga,z<" -]xM@\7ܤٽJ{#aHWEp0c<<25 c7],;X:g> .Pv%St kma\c;(;%0t<&:6=2hwk(S̢"یshbܜ?ރO2!ߒuԩ*, Ǽr8Juoc-[oDQT_@|:-cLR[8.|Eo uAŽX#trF jJ?F/0i[ HITzDx2D+G~ 1n}Jc ȍUS24 SsMX͌{z&M}7NKH=1Mzu>0*.3A* x  7#I7yq[0OCJ VXQw+69ϔ<zi|ލwu*N: Pϯfӌwd݄d>w$yښ"\Va&,p᳕n8J=x`tB}/^PpǹG\ z1F>_q'~=Uv y>zh4& XL6W8xuZ T$W:_m#$ځGg ODȥ:~ŵۑڅ0k=B&"naf zB4#YQ3Ijs9& I G 3\ٸ!+?뉃3K"z]#f#;.S|#B]ޜ_)lsarz5 ;9Т fE% ,qIW kd'q؜C}4.li ;&ɜ`˕*qYX b]hP,IG%J~욨~7Ge}z^ ?KgU^oȦ=S}suZ ,ixkBRf,(8"Aqɉ!d曰 R[WYިf{:hrg_Y8~hІiqrOLwV]*ϟp(@b1i`?xYVq<-](l^PU]Ӌ%N ;q8D8V㥓˜j$\- ,e"(އI) Eh%Hgc|O(@w`d;Įxd闉u:* ?NUy$^4:r]HSP:} 3>_kU~X76]Ctr{}n >^LqY]R [^٪**vnZK~p0Abw%&\~[`!5itc&X&&l/m6_k2pvu|{d{#qX30gƶ ?.kCGx]ZCnYBfV/^ӕ< j[l2ԁe^L^UF,*!`q!Z tlg ۍ{%5-`BqSWa^)IiճrQe$p#wf)C(#~ x&,qCsh(x~001iKS/Ղxo]7J8*L9 e3?wDmy+|^:([3=2ZPjթg `ZN5>aj1Iݖuaհ'IeÊnc8k.0*.,B~#ڄfp ~oƤۥ֖}344A(:^7$R8nBH%葰yxt|c<԰M-TT4qGxِ"/bRU(C9Fy#H{Ϳ{$LtédazTǸDB̧古'Db<_U$-I̕ G^`*/`K-6=CfK,'}C{MZ #T^q|&(=Ӱ~vaZZ'CLiHCU9_ho~ʩjB4HeWOiSUA T~x;CZ[T#ޏ:}`-{XbڶmիW}V`kyTy+By &/\j"t:5qZ2+h"tY ՎER.*">Ѷ8ђ&٬[C݉VX2^.Nwd>|^|i;ԫ]=ED(h?X'.ߏ:ȣlrR?zltjaa6}8}dGD nѪUG穖!@||vQKz݆uvuLֿqsT~}53G5TN:X?Yycl;hݺup\tn,X g-_y?FKK봋{Iu mݛp|vAɮdNhR״H?d둖ݎ7fHKKKKK=.ڵS03mܸ]'DF5ȵ*#V#[JxR/uA hF iZ5kapW٤Ve/S5#3k. U͂wZIJ f?49teDhW7دolFzz:h-LiiKАX׵=^t!˗`ԣ쓦 rl9Ix7еʣP dݩ3ũ*\ZgJ+]+37}deY?uu0 rC`*ʉ0%d)&#DJK["Xps:Exr2@j̍Du X)cS4LKuFh4LKUDF֙.w-]qIENDB`esprima-4.0.1/docs/syntactic-analysis.md000066400000000000000000000540061331122015500202460ustar00rootroot00000000000000# Chapter 2. Syntactic Analysis (Parsing) The main use case of Esprima is to parse a JavaScript program. This is also known as _[syntactic analysis](https://en.wikipedia.org/wiki/Parsing)_. Esprima parser takes a string representing a valid JavaScript program and produces a [syntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree), an ordered tree that describes the syntactic structure of the program. The resulting syntax tree is useful for various purposes, from [program transformation](https://en.wikipedia.org/wiki/Program_transformation) to [static program analysis](https://en.wikipedia.org/wiki/Static_program_analysis). The interface of the `parseScript`/`parseModule` function is as follows: ```js esprima.parseScript(input, config, delegate) esprima.parseModule(input, config, delegate) ``` where * `input` is the string representing the program to be parsed * `config` is an object used to customize the parsing behavior (optional) * `delegate` is a callback function invoked for every single node (optional) The `input` argument is mandatory. Its type must be a string, otherwise the parsing behavior is not determined. The other two arguments, `config` and `delegate`, are optional. The object returned by the `parseScript`/`parseModule` function is the [syntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree), following the format described in details in [Appendix A. Syntax Tree Format](syntax-tree-format.html). The description of various parsing configuration is summarized in the following table:
Name Type Default Description
jsx Boolean false Support JSX syntax
range Boolean false Annotate each node with its index-based location
loc Boolean false Annotate each node with its column and row-based location
tolerant Boolean false Tolerate a few cases of syntax errors
tokens Boolean false Collect every token
comment Boolean false Collect every line and block comment
![Runkit with Esprima parse](runkit-parse.png) The previous chapter, [Getting Started](getting-started.html), already demonstrates the simplest possible example of using Esprima parser. To use it as the basis for further experiments, use Runkit and tweak the existing demo notebook: [runkit.com/ariya/esprima-parse-demo](https://runkit.com/ariya/esprima-parse-demo). ## Distinguishing a Script and a Module With ES2015 and later, a JavaScript program can be either [a script or a module](http://www.ecma-international.org/ecma-262/6.0/index.html#sec-ecmascript-language-scripts-and-modules). It is a very important distinction, a parser such as Esprima needs to know the type of the source to be able to analyze its syntax correctly. This is achieved by choosing `parseScript` function to parse a script and `parseModule` function to parse a module. An example of parsing a script: ```js $ node > var esprima = require('esprima') > esprima.parseScript('answer = 42'); Script { type: 'Program', body: [ ExpressionStatement { type: 'ExpressionStatement', expression: [Object] } ], sourceType: 'script' } ``` An example of parsing a module: ```js $ node > var esprima = require('esprima') > esprima.parseModule('import { sqrt } from "math.js"'); Module { type: 'Program', body: [ ImportDeclaration { type: 'ImportDeclaration', specifiers: [Object], source: [Object] } ], sourceType: 'module' } ``` Failing to choose the correct parsing function can lead to a _mistaken_ observation that Esprima does not support a certain syntax. Take a look at this example: ```js $ node > var esprima = require('esprima') > esprima.parseScript('export const answer = 42'); Error: Line 1: Unexpected token ``` Instead of producing the syntax tree, the parser throws an exception. This is the correct behavior, an `export` statement can only be part of a module, not a script. Thus, the parser properly determines that such a source program is invalid. *Note*: In the previous versions (Esprima <= 3.1), there was a single parsing function, `parse`. To distinguish between parsing a script and a module, the `sourceType` property in the configuration object needs to be specified, either as `"script"` (also the default value) or `"module"`. While this `parse` function is still supported in Esprima 4 for API backward compatibility, its usage is highly discouraged and the support for it may be removed in a future version. ## JSX Syntax Support [JSX](http://facebook.github.io/jsx/) is a syntax extension to JavaScript, popularly known to build web applications using [React](https://facebook.github.io/react/). JSX is not part of any [official ECMAScript specification](http://www.ecma-international.org/publications/standards/Ecma-262.htm). Application code using JSX is typically preprocessed first into standard JavaScript. Esprima parser fully understands JSX syntax when `jsx` flag in the parsing configuration object is set to true, as illustrated in the following example: ```js $ node > var esprima = require('esprima') > esprima.parseScript('var el= ${product}', { jsx: true }); Script { type: 'Program', body: [ VariableDeclaration { type: 'VariableDeclaration', declarations: [Object], kind: 'var' } ], sourceType: 'script' } ``` ## Browser Compatibility In a certain specific case, Esprima parser _intentionally_ does not throw an exception (indicating a syntax error) although the input being parsed is not valid. This is to achieve an implementation compatibility with major web browsers. For further details, refer to the official [ECMAScript 2015 Language Specification](http://www.ecma-international.org/publications/standards/Ecma-262.htm), Section B.3.3 on **Block-Level Function Declarations Web Legacy Compatibility Semantics**: > Prior to ECMAScript 2015, the ECMAScript specification did not define the occurrence of a _FunctionDeclaration_ as an element of a _Block_ statement's _StatementList_. However, support for that form of _FunctionDeclaration_ was an allowable extension and most browser-hosted ECMAScript implementations permitted them. This is illustrated in the following example: ```js $ node > var esprima = require('esprima') > esprima.parseScript('if (x) function y() {}') Script { type: 'Program', body: [ IfStatement { type: 'IfStatement', test: [Object], consequent: [Object], alternate: null } ], sourceType: 'script' } ``` In the above example, Esprima parser returns a syntax tree for the code (it does not throw an exception) even though the input is invalid according to the specification, i.e. declaring a function inside the block of an If statement is not possible. In this case, the behavior of Esprima is the same as the popular web browsers such as Firefox, Chrome, Safari, and many others. ## Tolerant Mode When Esprima parser is given an input that does not represent a valid JavaScript program, it throws an exception. With the tolerant mode however, the parser _may_ choose to continue parsing and produce a syntax tree. This is best demonstrated with an example. Consider the following parsing session. The exception is expected, since a `with` statement is not permitted in strict mode. ```js $ node > var esprima = require('esprima') > esprima.parseScript('"use strict"; with (x) {}') Error: Line 1: Strict mode code may not include a with statement ``` If the tolerant mode is activated by setting the `tolerant` flag to true in the parsing configuration, the parser behaves differently: ```js $ node > var esprima = require('esprima') > esprima.parseScript('"use strict"; with (x) {}', { tolerant: true }) Script { type: 'Program', body: [ Directive { type: 'ExpressionStatement', expression: [Object], directive: 'use strict' }, WithStatement { type: 'WithStatement', object: [Object], body: [Object] } ], sourceType: 'script', errors: [ { Error: Line 1: Strict mode code may not include a with statement index: 13, lineNumber: 1, description: 'Strict mode code may not include a with statement' } ] } ``` In the above case, the parser does not throw an exception and it still returns a syntax tree. However, it also adds a new array named `errors`, it contains each and every syntax error that the parser manages to tolerate without causing it to stop right away. Each entry in the `errors` has the detailed information regarding the error, including the description and the location. Note that the tolerant mode is intended to deal with very few types of syntax errors. It is unable to robustly handle every possible invalid program. ## Node Location By default, Esprima parser produces an [abstract syntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree). For some use cases, this abstract syntax tree is not sufficient. For instance, having the location information of each node is necessary in a few cases of static analysis, e.g. to give a meaningful feedback to the user. To have each node carries some additional properties indicating its location, the parser must be invoked by specifying the flags, `range` or `loc` or both of them, in the parsing configuration. Setting the `range` flag to true adds a new property, `range`, to each node. It is an array of two elements, each indicating the zero-based index of the starting and end location (exclusive) of the node. A simple example follows: ```js $ node > var esprima = require('esprima') > esprima.parseScript('answer = 42', { range: true }) Script { type: 'Program', body: [ ExpressionStatement { type: 'ExpressionStatement', expression: [Object], range: [Object] } ], sourceType: 'script', range: [ 0, 11 ] } ``` The top-level _Program_ node has the range [0, 11]. This indicates that the program starts from the zeroth character and finishes before the 11th character. A subsequent example to inspect the numeric literal 42 on the right side of the assignment: ```js $ node > var esprima = require('esprima') > var program = esprima.parseScript('answer = 42', { range: true }) > program.body[0].expression.right Literal { type: 'Literal', value: 42, raw: '42', range: [ 9, 11 ] } ``` In the above example, the location of the _Literal_ node is determined to be [9, 11]. In other words, the ninth and the tenth characters (the eleventh is excluded) of the source correspond to the numeric literal `42`. Setting the `loc` flag to true adds a new property, `loc`, to each node. It is a object that contains the line number and column number of the starting and end location (exclusive) of the node. It is illustrated in this example: ```js $ node > var esprima = require('esprima') > esprima.parseScript('answer = 42', { loc: true }) Script { type: 'Program', body: [ ExpressionStatement { type: 'ExpressionStatement', expression: [Object], loc: [Object] } ], sourceType: 'script', loc: { start: { line: 1, column: 0 }, end: { line: 1, column: 11 } } } ``` Note that the line number is _one-based_ while the column number is _zero-based_. It is possible to set both `range` and `loc` to true, thereby giving each token the most complete location information. ## Handling Hashbang/Shebang In a Unix environment, a shell script often has its first line marked by a hashbang or a shebang, `#!`. A common example is a utility intended to be executed by Node.js, which may look like the following: ```js #!/usr/bin/env node console.log('Hello from Node.js!'); ``` If Esprima parser is being used to process the content of the above file, the parser will throw an exception. This is because that hashbang is not valid in JavaScript. A quick Node.js REPL session to illustrate the point: ```js $ node > var esprima = require('esprima') > var src = ['#!/usr/bin/env node', 'answer = 42'].join('\n') > esprima.parseScript(src) Error: Line 1: Unexpected token ILLEGAL ``` The workaround for this problem is to remove the first line completely before passing it to the parser. One way to do that is to use a regular expression, as shown below: ```js $ node > var esprima = require('esprima') > var src = ['#!/usr/bin/env node', 'answer = 42'].join('\n') > src = src.replace(/^#!(.*\n)/, '') 'answer = 42' > esprima.parseScript(src) Script { type: 'Program', body: [ ExpressionStatement { type: 'ExpressionStatement', expression: [Object] } ], sourceType: 'script' } ``` Note that the above approach will shorten the source string. If the string length needs to be preserved, e.g. to facilitate an exact location mapping to the original version, then a series of whitespaces need to be padded to the beginning. A modified approach looks like the following: ```js $ node > var esprima = require('esprima') > var src = ['#!/usr/bin/env node', 'answer = 42'].join('\n') > src = src.replace(/(^#!.*)/, function(m) { return Array(m.length + 1).join(' ') }); > esprima.parseScript(src, { range: true }) Script { type: 'Program', body: [ ExpressionStatement { type: 'ExpressionStatement', expression: [Object], range: [Object] } ], sourceType: 'script', range: [ 15, 26 ] } ``` ## Token Collection When Esprima parser is performing the syntactical analysis, first it needs to break down the source into a series of tokens. By default, the tokens are not stored as part of the parsing result. It is possible to keep the tokens found during the parsing by setting the `tokens` flag in the configuration object to true. Take a look at this example: ```js $ node > var esprima = require('esprima') > esprima.parseScript('const answer = 42', { tokens: true }) Script { type: 'Program', body: [ VariableDeclaration { type: 'VariableDeclaration', declarations: [Object], kind: 'const' } ], sourceType: 'script', tokens: [ { type: 'Keyword', value: 'const' }, { type: 'Identifier', value: 'answer' }, { type: 'Punctuator', value: '=' }, { type: 'Numeric', value: '42' } ] } ``` The output of the parser now contains an additional property, an array named `tokens`. Every element in this array is the token found during the parsing process. For each token, the `type` property is a string indicating the type of the token and the `value` property stores the corresponding the _lexeme_, i.e. a string of characters which forms a syntactic unit. The token also contains its location, if the parsing configuration has the flag `range` or `loc` (or both), as shown in the following example: ```js $ node > var esprima = require('esprima') > var output = esprima.parseScript('const answer = 42', { tokens: true, range: true }) > output.tokens [ { type: 'Keyword', value: 'const', range: [ 0, 5 ] }, { type: 'Identifier', value: 'answer', range: [ 6, 12 ] }, { type: 'Punctuator', value: '=', range: [ 13, 14 ] }, { type: 'Numeric', value: '42', range: [ 15, 17 ] } ] ``` To tokenize a program without parsing it at all, refer to [Chapter 3. Lexical Analysis (Tokenization)](syntactic-analysis.html). ## Comment Collection Comments do not affect the syntax of a JavaScript program and therefore they are ignored by Esprima parser. However, if it is important to collect every single-line and multi-line comment in the program, Esprima parser can be instructed to collect them by setting the `comment` flag in the parsing configuration to true. Consider the following example. The output of the parser has an additional property, an array named `comments`. Every element in this array indicates a single-line or a mult-line comment encountered during the parsing process. ```js $ node > var esprima = require('esprima') > esprima.parseScript('answer = 42 // TODO: why', { comment: true }) Script { type: 'Program', body: [ ExpressionStatement { type: 'ExpressionStatement', expression: [Object] } ], sourceType: 'script', comments: [ { type: 'Line', value: ' TODO: why' } ] } ``` The type of each comment can either be _Line_ for a single-line comment (`//` towards the end-of-line) or _Block_ for a multi-line comment (enclosed by `/*` and `*/`). ```js $ node > var esprima = require('esprima') > esprima.parseScript('/*everything*/ answer = 42', { comment: true }) Script { type: 'Program', body: [ ExpressionStatement { type: 'ExpressionStatement', expression: [Object] } ], sourceType: 'script', comments: [ { type: 'Block', value: 'everything' } ] } ``` Each comment can also contain its location, if the parsing configuration has the flag `range` or `loc` (or both), illustrated here: ```js $ node > var esprima = require('esprima') > output = esprima.parseScript('answer = 42 // TODO: why', { comment: true, range: true }); > output.comments [ { type: 'Line', value: ' TODO: why', range: [ 12, 24 ] } ] ``` ## Syntax Delegate The last argument in the `parseScript`/`parseModule` function is a delegate, a callback function invoked for each syntax node (as the node is constructed) with two arguments, the node object itself and the node metadata. The metadata contains the start and end location of the node. The shortest Node.js script that illustrates the delegate is the following: ```js var esprima = require('esprima'); esprima.parseScript('answer = 42', {}, function (node) { console.log(node.type); }); ``` If the script is called `delegate.js`, running it with Node.js gives the output: ```js $ node delegate.js Identifier Literal AssignmentExpression ExpressionStatement Program ``` In the above example, the callback function only does one simple thing: printing the type of the node. The first two calls are with the deepest nodes (which are also leaves), an _Identifier_ node representing `answer` and a _Literal_ node for `42`. The next is with an _AssignmentExpression_ node that combines the previous two nodes (`answer = 42`). It is then followed by the only statement in the code fragment, an _ExpressionStatement_ node. The last one, as with every syntax tree, is always the top-level _Program_ node. The order of the nodes being passed as the argument for the callback function resembles a tree traversal using the [depth-first algorithm](https://en.wikipedia.org/wiki/Depth-first_search). If each single-line and multi-line comment must be passed to the callback function as well, the `comment` flag in the parsing configuration needs to be true. A modified `delegate.js` and its new result (note the addition of _LineComment_ node type): ```js $ cat delegate.js var esprima = require('esprima'); esprima.parseScript('answer = 42 // FIXME', { comment: true }, function (node) { console.log(node.type); }); $ node delegate.js Identifier LineComment Literal AssignmentExpression ExpressionStatement Program ``` The second argument passed to the callback function, the metadata, can be used to locate the node. It is illustrated in the following example: ```js $ cat delegate.js var esprima = require('esprima'); esprima.parseScript('answer = 42', {}, function (node, metadata) { console.log(node.type, metadata); }); $ node delegate.js Identifier { start: { line: 1, column: 0, offset: 0 }, end: { line: 1, column: 6, offset: 6 } } Literal { start: { line: 1, column: 9, offset: 9 }, end: { line: 1, column: 11, offset: 11 } } AssignmentExpression { start: { line: 1, column: 0, offset: 0 }, end: { line: 1, column: 11, offset: 11 } } ExpressionStatement { start: { line: 1, column: 0, offset: 0 }, end: { line: 1, column: 11, offset: 11 } } Program { start: { line: 1, column: 0, offset: 0 }, end: { line: 1, column: 11, offset: 11 } } ``` ## Example: console Calls Removal The following Node.js script demonstrates the use of Esprima parser to remove every single expression that represents a `console` call. The script accepts the input from `stdin` and displays the result to `stdout`. The entire script comprises approximately 30 lines of code. ```js const esprima = require('esprima'); const readline = require('readline'); // console.log(x) or console['error'](y) function isConsoleCall(node) { return (node.type === 'CallExpression') && (node.callee.type === 'MemberExpression') && (node.callee.object.type === 'Identifier') && (node.callee.object.name === 'console'); } function removeCalls(source) { const entries = []; esprima.parseScript(source, {}, function (node, meta) { if (isConsoleCall(node)) { entries.push({ start: meta.start.offset, end: meta.end.offset }); } }); entries.sort((a, b) => { return b.end - a.end }).forEach(n => { source = source.slice(0, n.start) + source.slice(n.end); }); return source; } let source = ''; readline.createInterface({ input: process.stdin, terminal: false }) .on('line', line => { source += line + '\n' }) .on('close', () => { console.log(removeCalls(source)) }); ``` An example run is shown in the following screenshot (the script is called `unconsole.js`). Note that the single call to `console.log` is eliminated in the output. ![Console removal](unconsole.png) The script uses the [readline module](https://nodejs.org/api/readline.html) to read the input line-by-line, collecting each line to a buffer. Once there is no more input, it uses Esprima parser and utilizes the syntax delegate feature with a callback function that looks for a particular type of syntax node, i.e. a call expression with `console` object as the callee. The logic inside the `isConsoleCall` function is intended to match such a node. As an illustration, using the [Esprima online demo](http://esprima.org/demo/parse.html) to parse `console.log("Hello")` will reveal the following syntax tree: ![Call expression](callexpr.png) For each matched node, the node location is recorded. Once the parsing is completed, the list of the location of every matched call expression with `console` is used to modify the source, i.e. the portion of the source corresponding to the call expression is removed. When it is done repeatedly, the result is that every single `console` call will disappear. Note how this is done from the last one to the first one (reflected by the sorting in the reverse order) to maintain the correct offset throughout the process. esprima-4.0.1/docs/syntax-tree-format.md000066400000000000000000000330111331122015500201660ustar00rootroot00000000000000# Appendix A. Syntax Tree Format Esprima syntax tree format is derived from the original version of [Mozilla Parser API](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Parser_API), which is then formalized and expanded as the [ESTree specification](https://github.com/estree/estree). **Note**: In the following sections, interfaces are described using the syntax of [TypeScript interface](https://www.typescriptlang.org/docs/handbook/interfaces.html). Each node is represented as a regular JavaScript object that implements the interface: ```js interface Node { type: string; } ``` The `type` property is a string that contains the variant type of the node. Each subtype of _Node_ is explained in the subsequent sections. When the node is annotated with [its location](syntactic-analysis.html#node-location), the interface becomes: ```js interface Node { type: string; range?: [number, number]; loc?: SourceLocation; } ``` with the source location defined as: ```js interface Position { line: number; column: number; } interface SourceLocation { start: Position; end: Position; source?: string | null; } ``` ## Expressions and Patterns A binding pattern can be one of the following: ```js type BindingPattern = ArrayPattern | ObjectPattern; ``` An expression can be one of the following: ```js type Expression = ThisExpression | Identifier | Literal | ArrayExpression | ObjectExpression | FunctionExpression | ArrowFunctionExpression | ClassExpression | TaggedTemplateExpression | MemberExpression | Super | MetaProperty | NewExpression | CallExpression | UpdateExpression | AwaitExpression | UnaryExpression | BinaryExpression | LogicalExpression | ConditionalExpression | YieldExpression | AssignmentExpression | SequenceExpression; ``` ### Array Pattern ```js interface ArrayPattern { type: 'ArrayPattern'; elements: ArrayPatternElement[]; } ``` with ```js type ArrayPatternElement = AssignmentPattern | Identifier | BindingPattern | RestElement | null; interface RestElement { type: 'RestElement'; argument: Identifier | BindingPattern; } ``` ### Assignment Pattern ```js interface AssignmentPattern { type: 'AssignmentPattern'; left: Identifier | BindingPattern; right: Expression; } ``` ### Object Pattern ```js interface ObjectPattern { type: 'ObjectPattern'; properties: Property[]; } ``` ### This Expression ```js interface ThisExpression { type: 'ThisExpression'; } ``` ### Identifier ```js interface Identifier { type: 'Identifier'; name: string; } ``` ### Literal ```js interface Literal { type: 'Literal'; value: boolean | number | string | RegExp | null; raw: string; regex?: { pattern: string, flags: string }; } ``` The `regex` property only applies to regular expression literals. ### Array Expression ```js interface ArrayExpression { type: 'ArrayExpression'; elements: ArrayExpressionElement[]; } ``` where ```js type ArrayExpressionElement = Expression | SpreadElement; ``` ### Object Expression ```js interface ObjectExpression { type: 'ObjectExpression'; properties: Property[]; } ``` where ```js interface Property { type: 'Property'; key: Expression; computed: boolean; value: Expression | null; kind: 'get' | 'set' | 'init'; method: false; shorthand: boolean; } ``` ### Function Expression ```js interface FunctionExpression { type: 'FunctionExpression'; id: Identifier | null; params: FunctionParameter[]; body: BlockStatement; generator: boolean; async: boolean; expression: boolean; } ``` with ```js type FunctionParameter = AssignmentPattern | Identifier | BindingPattern; ``` The value of `generator` is true for a generator expression. ### Arrow Function Expression ```js interface ArrowFunctionExpression { type: 'ArrowFunctionExpression'; id: Identifier | null; params: FunctionParameter[]; body: BlockStatement | Expression; generator: boolean; async: boolean; expression: false; } ``` ### Class Expression ```js interface ClassExpression { type: 'ClassExpression'; id: Identifier | null; superClass: Identifier | null; body: ClassBody; } ``` with ```js interface ClassBody { type: 'ClassBody'; body: MethodDefinition[]; } interface MethodDefinition { type: 'MethodDefinition'; key: Expression | null; computed: boolean; value: FunctionExpression | null; kind: 'method' | 'constructor'; static: boolean; } ``` ### Tagged Template Expression ```js interface TaggedTemplateExpression { type: 'TaggedTemplateExpression'; readonly tag: Expression; readonly quasi: TemplateLiteral; } ``` with ```js interface TemplateElement { type: 'TemplateElement'; value: { cooked: string; raw: string }; tail: boolean; } interface TemplateLiteral { type: 'TemplateLiteral'; quasis: TemplateElement[]; expressions: Expression[]; } ``` ### Member Expression ```js interface MemberExpression { type: 'MemberExpression'; computed: boolean; object: Expression; property: Expression; } ``` ### Super ```js interface Super { type: 'Super'; } ``` ### MetaProperty ```js interface MetaProperty { type: 'MetaProperty'; meta: Identifier; property: Identifier; } ``` ### Call and New Expressions ```js interface CallExpression { type: 'CallExpression'; callee: Expression; arguments: ArgumentListElement[]; } interface NewExpression { type: 'NewExpression'; callee: Expression; arguments: ArgumentListElement[]; } ``` with ```js type ArgumentListElement = Expression | SpreadElement; interface SpreadElement { type: 'SpreadElement'; argument: Expression; } ``` ### Update Expression ```js interface UpdateExpression { type: 'UpdateExpression'; operator: '++' | '--'; argument: Expression; prefix: boolean; } ``` ### Await Expression ```js interface AwaitExpression { type: 'AwaitExpression'; argument: Expression; } ``` ### Unary Expression ```js interface UnaryExpression { type: 'UnaryExpression'; operator: '+' | '-' | '~' | '!' | 'delete' | 'void' | 'typeof'; argument: Expression; prefix: true; } ``` ### Binary Expression ```js interface BinaryExpression { type: 'BinaryExpression'; operator: 'instanceof' | 'in' | '+' | '-' | '*' | '/' | '%' | '**' | '|' | '^' | '&' | '==' | '!=' | '===' | '!==' | '<' | '>' | '<=' | '<<' | '>>' | '>>>'; left: Expression; right: Expression; } ``` ### Logical Expression ```js interface LogicalExpression { type: 'LogicalExpression'; operator: '||' | '&&'; left: Expression; right: Expression; } ``` ### Conditional Expression ```js interface ConditionalExpression { type: 'ConditionalExpression'; test: Expression; consequent: Expression; alternate: Expression; } ``` ### Yield Expression ```js interface YieldExpression { type: 'YieldExpression'; argument: Expression | null; delegate: boolean; } ``` ### Assignment Expression ```js interface AssignmentExpression { type: 'AssignmentExpression'; operator: '=' | '*=' | '**=' | '/=' | '%=' | '+=' | '-=' | '<<=' | '>>=' | '>>>=' | '&=' | '^=' | '|='; left: Expression; right: Expression; } ``` ### Sequence Expression ```js interface SequenceExpression { type: 'SequenceExpression'; expressions: Expression[]; } ``` ## Statements and Declarations A statement can be one of the following: ```js type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForStatement | ForInStatement | ForOfStatement | FunctionDeclaration | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement; ``` A declaration can be one of the following: ```js type Declaration = ClassDeclaration | FunctionDeclaration | VariableDeclaration; ``` A statement list item is either a statement or a declaration: ```js type StatementListItem = Declaration | Statement; ``` ### Block Statement A series of statements enclosed by a pair of curly braces form a block statement: ```js interface BlockStatement { type: 'BlockStatement'; body: StatementListItem[]; } ``` ### Break Statement ```js interface BreakStatement { type: 'BreakStatement'; label: Identifier | null; } ``` ### Class Declaration ```js interface ClassDeclaration { type: 'ClassDeclaration'; id: Identifier | null; superClass: Identifier | null; body: ClassBody; } ``` ### Continue Statement ```js interface ContinueStatement { type: 'ContinueStatement'; label: Identifier | null; } ``` ### Debugger Statement ```js interface DebuggerStatement { type: 'DebuggerStatement'; } ``` ### Do-While Statement ```js interface DoWhileStatement { type: 'DoWhileStatement'; body: Statement; test: Expression; } ``` ### Empty Statement ```js interface EmptyStatement { type: 'EmptyStatement'; } ``` ### Expression Statement ```js interface ExpressionStatement { type: 'ExpressionStatement'; expression: Expression; directive?: string; } ``` When the expression statement represents a directive (such as `"use strict"`), then the `directive` property will contain the directive string. ### For Statement ```js interface ForStatement { type: 'ForStatement'; init: Expression | VariableDeclaration | null; test: Expression | null; update: Expression | null; body: Statement; } ``` ### For-In Statement ```js interface ForInStatement { type: 'ForInStatement'; left: Expression; right: Expression; body: Statement; each: false; } ``` ### For-Of Statement ```js interface ForOfStatement { type: 'ForOfStatement'; left: Expression; right: Expression; body: Statement; } ``` ### Function Declaration ```js interface FunctionDeclaration { type: 'FunctionDeclaration'; id: Identifier | null; params: FunctionParameter[]; body: BlockStatement; generator: boolean; async: boolean; expression: false; } ``` with ```js type FunctionParameter = AssignmentPattern | Identifier | BindingPattern; ``` ### If Statement ```js interface IfStatement { type: 'IfStatement'; test: Expression; consequent: Statement; alternate?: Statement; } ``` ### Labelled Statement A statement prefixed by a label becomes a labelled statement: ```js interface LabeledStatement { type: 'LabeledStatement'; label: Identifier; body: Statement; } ``` ### Return Statement ```js interface ReturnStatement { type: 'ReturnStatement'; argument: Expression | null; } ``` ### Switch Statement ```js interface SwitchStatement { type: 'SwitchStatement'; discriminant: Expression; cases: SwitchCase[]; } ``` with ```js interface SwitchCase { type: 'SwitchCase'; test: Expression | null; consequent: Statement[]; } ``` ### Throw Statement ```js interface ThrowStatement { type: 'ThrowStatement'; argument: Expression; } ``` ### Try Statement ```js interface TryStatement { type: 'TryStatement'; block: BlockStatement; handler: CatchClause | null; finalizer: BlockStatement | null; } ``` with ```js interface CatchClause { type: 'CatchClause'; param: Identifier | BindingPattern; body: BlockStatement; } ``` ### Variable Declaration ```js interface VariableDeclaration { type: 'VariableDeclaration'; declarations: VariableDeclarator[]; kind: 'var' | 'const' | 'let'; } ``` with ```js interface VariableDeclarator { type: 'VariableDeclarator'; id: Identifier | BindingPattern; init: Expression | null; } ``` ### While Statement ```js interface WhileStatement { type: 'WhileStatement'; test: Expression; body: Statement; } ``` ### With Statement ```js interface WithStatement { type: 'WithStatement'; object: Expression; body: Statement; } ``` ## Scripts and Modules A program can be either a script or a module. ```js interface Program { type: 'Program'; sourceType: 'script'; body: StatementListItem[]; } interface Program { type: 'Program'; sourceType: 'module'; body: ModuleItem[]; } ``` with ```js type StatementListItem = Declaration | Statement; type ModuleItem = ImportDeclaration | ExportDeclaration | StatementListItem; ``` ### Import Declaration ```js type ImportDeclaration { type: 'ImportDeclaration'; specifiers: ImportSpecifier[]; source: Literal; } ``` with ```js interface ImportSpecifier { type: 'ImportSpecifier' | 'ImportDefaultSpecifier' | 'ImportNamespaceSpecifier'; local: Identifier; imported?: Identifier; } ``` ### Export Declaration An export declaration can be in the form of a batch, a default, or a named declaration. ```js type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration; ``` Each possible export declaration is described as follows: ```js interface ExportAllDeclaration { type: 'ExportAllDeclaration'; source: Literal; } interface ExportDefaultDeclaration { type: 'ExportDefaultDeclaration'; declaration: Identifier | BindingPattern | ClassDeclaration | Expression | FunctionDeclaration; } interface ExportNamedDeclaration { type: 'ExportNamedDeclaration'; declaration: ClassDeclaration | FunctionDeclaration | VariableDeclaration; specifiers: ExportSpecifier[]; source: Literal; } ``` with ```js interface ExportSpecifier { type: 'ExportSpecifier'; exported: Identifier; local: Identifier; }; ``` esprima-4.0.1/docs/unconsole.png000066400000000000000000000542331331122015500166170ustar00rootroot00000000000000PNG  IHDR sRGBgAMA a pHYsX0IDATx^`{Җ e){**?qād(C@! {RFw7q--?}i&KrOrIE """"r2_""""" KDDDDNA.9%]""""rJ DDDDt)1Sb%""""ĠKDDDDNA.9%]""""rJ.03C,99[A|k!\"""";쳥ٞ@AW z̠~R᠛U75sP$Q րk IYS5%CAWjl/f7_""""XíQ1ٷPUgpK̢5bV3:jVE̴;蚽al6_UHFeG3ĚVoVvّt]5j 0kx!F]Ws*k;]ܒ:kj܄=z># .61QˠKDDDDiQgcmyvfV\ж<$ fu$C.lrU=cWWWqcy->[#[b],#o*T5îW]b;dd;5ldޟ~4fA8z_qa xF^0TCnSTPW7(-#owAp _@c܄Mxf`|Z푸3i6̅Y$^ƹgRӻ%s?914̭/cDY483Rv/֮ٙS߮DCqm(hO_D|~Li e:B7̑#@wxv]۷1b,dzֶuz}K)zEpҫ2@DDDNK-8q"FqOyQZr>)=>lV1j =8znI @^ɏgVi`T,7 r.Wd5"ߺ]bg71Q^$Qo'C(ZQ+GsP_:} E+1jl9qz}??Akz~bvv0~x,9op/?FgǾIe\/lt/cջ>z ŷcŗR8qn|O"R'ǣlcW[^ ZjwU?{_ nFa׷/zO^N-z#"" k֬ z+J˗ɓSvݺFC;"@rV>x, S&rʃ91m _/'tuzBN3k涣&bӨv8[%J58eӏJqpejZ 4j~VTlXO0/?N<пqz : eѫ>{\ X`K7eG5_%鲚D[ ;vƪ-%7EyXw9܁ X3Xx >b1TMo\t{%im:3Į.*' rA1Xd -37M] u$>sƏnZԮrԿտ\طa1ygöw'1g.L]oy>^CA=OU7}pG-шOfN5܈D`WPnHt33QVek<5LOE~'yҝ;b0z kE0nlgdr4|jWY{f U}p53_[qQ_aMaۨo"fMQ21[JHW8\f21V-7m7ݖy:"""5mݺubDGm}Ν;hǗ_G}d{2hWԝ~e+.M]83nn䪟e\TҶ]hn _q5.Onn3"""hOxhTQf~]""""wCtKDDDDNA.9%]""""rJ DDDD2bġn$򈈈ݻ0`@M=(څv8d5&""""Q2<(-2-2L9JQQVI%%PSE #ʼ-%T$݋[\bCvrS'ڂc[g,% s%e3*2eo7* '55*eAkM]2H"*&-#Td]t ]W_!OY EJzfpmtv|R$d]2*wA,FF]Ft/Ko,-1 !L+l_YеC{zj_?,z '*-%s' (PHY͠ @֔.#;[nX?:2*: ,| vȨ8r^>]ɁZ 3 I]5* qdYj g"OdDeK֍"FEl+d#~55*I-ԓp?% ߿AzEr#=d0kOWL}YޖpU7HMY]!ߣ^oU,_Wo5nnwۜ.?gpKt dunXaُ7ĉb#tm[WF>o'p|3ZGNСce[oU}/Tscah0j@@QmZ4ClnNi {EZ9_ `v֠Ըg7exmԵ'z. +56%Sx~u,9` u v/)6i]7B—#;Hy1aߑj0Ua;X.gb`{_~Tk:XųJ ge}쯞oF6=JݱAj?7@6-C.=4jlZ޲Pl~ܾ^om߾m~z,˹#;f!=B϶udYA޽ѻGwWm<~}6WxUٽ;u=__n$SkcvK\mkن" ]d; % 䧣Mۏ%V7:MA׼*UU2:ǾeguXd>vؔ[VeegEvRdGDV婳Yˑ $#?S__ ;t^+*Eqި'59ّɎzc@L|Qt'3t0y͔ѶLg4o7Sa@'$|w IH9^vj'$^r%oɰ.Vͨ65q-̆c2EԱ'Ó*=9QUL0ɥ$ i*+Ar2Ip0"2*ג+?;PY.^cS/eC斺uobd"kUCvR''Rue9 2|e9<adYudY9yLԗ5Q>RJB]O٫ TTOx{ S|nj\zLW[˞Ti,WͫVR2C e|7E-;Ce#\TgOYX*OMRvl;ody[> ]c*H"n5 j>6gKSm9R,s2IA9ױ\q0GUQY;H?Ō9'[M M\M]ߦ|ne-!3Y;X/:Lô]`w98Y\l 8N^m׶_%F޲[R6ů9Z]`ldbZweҵ,KeJjqZ Mc娕?9|g%6me'\> 7l} ̗m-[qh-`[ߢyFh)ۺ' s= ;~~ݎ'Bǵh :#ڶmS?[=/l=KM4Cf J;ʎN8dĜݨNAtF.ѥSgk >_ecg|h"f= m۴A˰l\vzBDDy |HrNjObbiwn޼iW\Ѯ?j%]?mG4mҊ.Lk_lRʚ:%omQ*9BeZܯ ige|^T7wk&zs?nm{3<]~ Bm_K첵)?Ҏ~:Ls|{(>x:_r*׎|)('5hϖHno>Z=X6~rw'7o ږ@;𾭹.%w>-u~NC)뼽m~I .nRɶ-<2"ZiNY_З54}JR%y2Q/̿Rc_dڧ{8W ixB:W e,d7ZEUl%)ˮ4hsPELY7K'וvxM,dyרKu ,#+,ԛ)Yd\#:W.L尪&',GּLSShYT_AYdn2 ^-%lͪWvYׇOKr. kܞ"ۙ 2Eu?LCV٦/yRB-nV/'*紵akW;5l Ò__AkmͣvwsrX]y7Afr{ꥠv^޹uh6_۽ZӢNhu j>Yvk)wh2`a,ks}n_"i1i ٖݿ>iojk/t$&uRi.AN+c>2}-|,F^i٭u(]ݒ/m-UNoCBmP,{Q:G!ʚ2 QvvB>ߝo m yfi/ipp-S':3%H]tqesO_I&r&E)HQq 'X6C.a{vy |v!Y|ylgMu ;++Tcd|5mY l RjA~9`h` 7VLW[񣀗&'~I{ܖrOƭLCY ˴fD2NWdE^vbJE{6Eܒ]}-n4ԣc0XunNiTVm|2_S,wd1/Ñ yfٳVL Y6sk  ~InW< vpfޞWΫ|qpYMFe/~;hT2q22?d+ C3edzA懯,sR;3āeI7Bez}\,e~)˓y%냹L&He,{aM'ɯʴdϤn7Ye3eQ^+ʖ7ZgQ]hɀx p#mZ"YA4)e39[#+|_AH[ ^5+/{ +׍'<^orFI_F\,`|yѶ'&[7)ikQJv FI9{B/Ե ޙ+NކJO6*c>*>Vv|YE jC4^{.{B*ܧ_OS}_8`ےhݸ nG[B.;wn̝;ƍÊ+7gz3S*{#y_@ B kpmж(%A^S84lw0KclW1,X71;BBC#w4bq|7}۫5J^rwTu ͛76# k{42,OKf3ī},+#ޖ_cPx-ꛄ〇KHX$h|wCdJ O)rNX3!aGZ8"/.Y.dRZɞ5D:W+ղ6se>" Ӣ񊐃G6j|ԼKDczmɒZN7tP@es˴U5Ui/3IŖj7v!AXU}}֕hY=/ dT杼8BR#P|e, |xddI.|5&$Z.3mL}`1N9 Ry~)fEUȼɨ6 dK̄I]y_j?ho:4FY4ƨ׊2$Y\cGg CqqU_1$$vzGU8>5QupIdK4wbR HY]\),Z;~Cݔ'+je*Y}%$ad^곶ӌ'edaN˃KHH/Uxzaŋ n ݎ蛸e$2C)V]sTݻt/z;cf~MG.qrYInQ7L8Nߐ|3 (m'kje>jkWmA+Ӏ<;@0;#lBXK&$;PZN^&o\Ww|(R˧S@&$+[eg,3s # 墥dYVgcdc -JHv2q W{E rҚePgӜlWdX0d.+JUA(ǩSFlTR\e{BָQ!J$^vjΑj\sV̚<dŷN]]'2#i?ea4xE>f hLo y]#&dyvbTRg~D,'K <*+r߀mY dkwsHL::qKrg+u΀&d;3ROs2W[N5 ~ KH ~Fʁ8)c%{)Y~_;e O<s-(J{lƹD:Bc2sH=p(zFۨ Kj>"R|?K sG#JF~V^0Sf}9R56O*$r玬j_%Uo.+]7_e;[w}{jl5?oPoD^Շ1okZ >ftR,ˡwnEa6h7y mw;b$j̯ gv1Lr\ַq xqbKDߴeP Kyft}|Al.s.^MƮDvS^w;#[n鿴{M4lڵ-'$)SʝYWT~E(.&7,=i/w;G>D6#mA!.^C/z+gAvue5Vϋ;k^71kKiS^tg9) w%"F=dNmw ̠b!:ë!{ôn{(EttngnƲQEQ _[LeԶ=7K kdiZruS6Pca*3P^V ٟmtpWc:UJ@W$D||%DmQȆ_=^1 sf.=3W6$(,LiWm$Ofޒ`MvvsWdhݿ~Mt ⯀/,;e jxNo:% d*AwlOE$=)h|̓Rwf|*w8KSAL}/W$W&/5gI7,i5t*2_q0{YD3拗,0$IGu&.ԙ7c>x2WYPʸdOy6$uYF PulD _V_]dYҧWh)P3+" ?_ETxqTgi,?vmٹL嫟mGmvIH7'-CDLe:*X>]69yDPۼPQYw7gz=C֣RԺ2)Y_->@ 8:M:`1Zc2^SQzI2,lLyJoK}+x{y[N5zȾ\NfM8yZFN],)IOȑ2h(c?8VPC|e7g wcf(Yd2_^6]Nr.O[=dSҧLֵ#ZU&Yg>'!koA7KV:܂([k{jp~]y[ |B#MeJ]s G8\Kc%kɾ@Oqo V{ h1y޹{b\AXϣz>h8z4HjرgDP/<^aQ0/gWլ\b8bYSwgg*䚢[L%ߌi͎J`Xi;'ᯅ AOP&=Rvau:-,,{'uqj`7 D/w$#% ;$$TW7mXUE𞺌0)Ђ͛@E'Lg˖^BcOhAvbvȼnϔY&;u-A46SCVabk}z&n~ݬENԴa7w3]=SNa(2 UNOn2~-7KYKeu#F KٹzY\~l]yKjeCw7|V` C;VceRקhttE**)eȴXXYfK}52g'Glgy;y!YddY5\Uu5h5@ޣ萲=5듲~E'5.=nV9ΞҜbS빱Una3)ǹ Fg̒e^Q7,h(JQf4O_gdԩ}CI?j*k^d>f.Qc~#k8ڏUd&A5ȾXܽ8gh+Аj7)w"O)ꃤ9Lj Nz_U\}8yغ5a!Zp - @a-s8gzi!vP&~ctmw8p)Eތޒ7eRнp}yV^Vi®54!m'/jF͐"/\e}k?a+.,4{Y楄5Tjl3El~ISi,TyS5TT,\%YNdZ,J` Seiy*KzKBӰ@dCSfr״KvcqR)mZf͵fC_3_U˓2(*7FFFf$fBuQHI: ;xp 7H DWF]ZyFFK*rZ=Q(/eFQ hTXdt o^I,Kd^!]mS,{~PPm]37,a@P`zxoovW3YJc7te>7DpqȎm;-=C;wN\!kB|^'5\utQr&&&@\*Ֆ0A7њꖡ3a%""""]вرw%s_QdGEZ-Pp6!r͊U{Rcе;j=K޸-J<_Y)^`yH(e|29 (gYt[~`3B-5X8hO)GaCsCmFET'GwVcNF[d-:co>'#+6kV۠:QFGx_ʂRZgì燡it}5_FƃSQHТйt̔&.n{߯ܨ9e _Y 5#{Z0lv;l"""zB= oϻۙ|l5AZ0|F+j7&5ʦb_xn 8GA*۵0g1xs:lzHc]:Mp*>wো;a8y%~؆/…PN3G.D%;0dh+254FmJY?n02O^Ĭ{hiomwDOeQEok?i`W@Gy4jvmۣa%g3}鯭_6뿰fő_1Sj2[̮YAFQuOJ.d4M?j7m~_FRէD!m}2Zƃjܪ۲_5{0˴;vH}v/7jGӴ'3b-|>-q2i5mRٗmfi횻}O˚ve"_Z;a7sNm.j]eakµ:Y\\j~ڦ+ZZ@0-O|RJhڡvMҊu\xon^ijDv@3^'ۼ]iww/IFjGyFIgnVong.}ҞosEIh%Zh֝h׏_B̟{iQZtZA?O*ڏ&gQ\kPUS{ߒMjӱ>8KYuZoz?g'Rw!?l+EL[Zai~Sڥs]I]V3[Nrh=J&mfve:p=?]M^F{mh[\S#uԪECyꂯq܎MD un޸gNK}F3F[JFbs6n|H0zxǾ/2˕Z jʆKDkx[q kH\|~U}hS%9_\8:f|mGq5k‚q߁r"GHYWOȕ1/Se+;wǙ=L]aXm4U cfID.9fwoM/ 3ڏ@kܿIsH,gM_֯ Oҥ2#q!J0d^9k"" Cn!/maegL̅MFۨqްQKDDDt*MŌ9w(4/Zyo&UfU}cѣ[w=7*ת -+d8?4k q*VT}mE|Dpkόo|]f59ܢp^;wC*E4rOu:ϾA倻d^nkh.5DKS@ApsF[J&LlĪH"+_j'x d3}y8.m9 B.57,Aq|:uȳPU/ c>{eݘӶh"y~9Rd![|YZў1nt>g葓IAזj\q*ƓSW!n"$"(ieO {PwWqv<7/%nq@θ|_OS{R8w;O~׮G_:L>~NDiv:n܌ӻI,DӁ1xvX6o\!B!%0꒵Y~H eC+B:n9 &kDBz7l FR~NR77$&إv(QqX=-lqYC`k:N>X\\"xI7AYen`?l ¯|ƮS,oΝ&R4k">sRe+ɼ=Fz R5#""PhNED#..NoKv8#WB7xzzֵsuxX~ 3*\9]pҨ3(PP$ꪈ'ʯM^! K`V\?ub/*肄8w]±EX|uQ!VW& ˓8~8.Y)?aa-hQ>!(]; ˝_>3IoL/p1ܼ7g0eO<qYəs# ,7\o]@]W˛ΜO YsA+\d>@ir2ϨIV|z>9^~ ]P%rt^n*s1Vv"M5DDD^*CرCrTOY ON< vw!BuY\%GK#UIA7PMIIwv ^]律kjvna8o,roE-VFޥxOs|7?q]Ǯ9ereYjFĶX~MLEqE&]vM_Zft(W>XG4@W7](T rx}0ܶhBXxmh|7C.ߐ/_>ɓ'%&ϝ%"""!#""qMKowt]r3z9KDDDD DDDDt)1Sb%""""ĠKDDDDNA.9%]""""rJ DDDDt)1Sb%""""ĠKDDDDNA.9%]""""rJ DDDD䔜>zFR[ 0ڈ*[|T\UVC5צTV:jծ`d{j֬2ʴEW¯N~?Sډw?aU&5{w/>ヌϾ݆WFYw\Ŷ5cђujU2CgM{.M1cZN;#7*cy=""""lzBGe' VM_һzGϹ!QlI+^v?^%a'31Wi,] KD%9CՐ+hK6yH3hs-իWG++mgMUCj5P@V ɋ_Uը)2\ UVGbgL%4 c%"""z2] / x/\I9QKl:zhJsΦAF9+fX;w;oyߨHvW;6*,TktR4,ₘxWslލ_ǯGb.z}6/cWq`/5֭ g6/ֻ+ V_˟3؇WE~`ݕXiQKDDDD%Ӄ?X7t}8YwxlZ>Qj6-GN%VF\&l>QKGeޮxz]wןPl)yA)d(Y,i[л1U[6C*D֬Q\ixj/.Aɳ|qYw^^}K_fQfԠ{.0Cط .^ Gt? t%Kd|@[<շlK V)A1SH4RF\GTp{,߮KaϞ?pan'k.k H{V?,>YΖ6ּ]{GsN|GeO1*l.>m台FF-]t}fB}СA%i6?ѯQ1d= 톾YVFۃ:FPS :9 OoWh]WwO޼;wB>sP|3i2ܤ+|ccc&tѭdkܾ5Om0*Ԡn;+ U ,n4܊^i #\ cyc3ua|Q,|~WG Eq6w':Vx *܍]秝(ެ1.;]vJ g._CtvWr-eW[1;g~5*ڽA;5ˇ^>4j(3djU$nop8!u![o=ϯx{sd28sx?j6zPAjÈFŽbݝؼ>:O^{ObbߎhdjK쌷Fvsn̢7Jn Uňؘbƞ{`xI|oWky`4ߨ (3hiPxy;xp7FjqOC(_6|.nt=7|sBżHtq#;pZKT¹H)U~z6.ePZ zybϛ៿ǜы7JUG ߶h ·R9FRUvGfرw@g#s:73+ʐp~Yu!̨ WxyyC/IUgR G[~*w*""""z(͠.7B\ DDDDa%"""t)1Sb%""""ĠKDDDDNA.9%]""""rJ DDDDt)1Sb%""""ĠKDDDDNA.9%]""""rJ DDDDt)1Sb%""""ĠKDDDDNA.9%]""""rJ DDDDt)1Sb%""""ĠKDDDDNA.9%]""""rJ DDDDt)1Sb%""""ĠKDDDD(OOOF[a%""";6l؀,Yzټys]]""""`ʔ)ضmAҥKpss3 DDDDIHH@n0~xȹeL |{A=> ̧qtàKDD DDDD#p(yAWY`u-.|WgZU5誙~bԨQhժ\kq㼽ꫯe˖?}=ԠB!Cpq|(\0#"""{.Νf͚aػw/|}}tdɂ~'NҥK-[6^@DDD$"##1~xԫW#FПn;2-޹s&L2e<y=z [nŖ-[KT+T_TN?mͤ)% XhN<={bDDDDN@ܸq~V&M3 RQ vՍ^zɏͨ ]MfR@,\m۶՟˳DDDDmYׯ_/]9r pΝ[nM2gz3:GnXX~r%x3DAlРAU… c3*oڞ׫JF+ZRrўn39TyP*S9r$LzjC\ogfUU13*P?H,X=%zu^mlǃT""t*nڴI董(Z7ȓ;|=\uٟU.YWG3'`+*jGg]3*AwX6OyFN]"irx و˺m""O$<)jtSFHtу5bN;! *q6\5[7UzMzo=LDDDD<3aFǼl f1î# *ĚWKX) xuJ ʓM,@XOOi{K!<)AWl5욁zIٟ*DDDDDjQuv,fupU1SAWVW3 րU<?gVknkf{ j@zh*FK3A6b\eY@jkulu;**YC5: _""""XY>䪜Rzn/QZTx먘e(*ꬭj6+j0 DDDDkf\3ku6WpUKT1uP0X""""x3ZI]R McDDDDDdK==nZvAd$̦]""""SWG1Sb%""""ĠKDDDDNA.9%]""""rJ DDDDt)1Sb%""""ĠKDDDDNA.9%]""""rJ DDDDt)1Sb%""""ĠKDDDDNAL)H61IENDB`esprima-4.0.1/package.json000066400000000000000000000105541331122015500154400ustar00rootroot00000000000000{ "name": "esprima", "description": "ECMAScript parsing infrastructure for multipurpose analysis", "homepage": "http://esprima.org", "main": "dist/esprima.js", "bin": { "esparse": "./bin/esparse.js", "esvalidate": "./bin/esvalidate.js" }, "version": "4.0.1", "files": [ "bin", "dist/esprima.js" ], "engines": { "node": ">=4" }, "author": { "name": "Ariya Hidayat", "email": "ariya.hidayat@gmail.com" }, "maintainers": [ { "name": "Ariya Hidayat", "email": "ariya.hidayat@gmail.com", "web": "http://ariya.ofilabs.com" } ], "repository": { "type": "git", "url": "https://github.com/jquery/esprima.git" }, "bugs": { "url": "https://github.com/jquery/esprima/issues" }, "license": "BSD-2-Clause", "devDependencies": { "codecov.io": "~0.1.6", "escomplex-js": "1.2.0", "everything.js": "~1.0.3", "glob": "~7.1.0", "istanbul": "~0.4.0", "json-diff": "~0.3.1", "karma": "~1.3.0", "karma-chrome-launcher": "~2.0.0", "karma-detect-browsers": "~2.2.3", "karma-edge-launcher": "~0.2.0", "karma-firefox-launcher": "~1.0.0", "karma-ie-launcher": "~1.0.0", "karma-mocha": "~1.3.0", "karma-safari-launcher": "~1.0.0", "karma-safaritechpreview-launcher": "~0.0.4", "karma-sauce-launcher": "~1.1.0", "lodash": "~3.10.1", "mocha": "~3.2.0", "node-tick-processor": "~0.0.2", "regenerate": "~1.3.2", "temp": "~0.8.3", "tslint": "~5.1.0", "typescript": "~2.3.2", "typescript-formatter": "~5.1.3", "unicode-8.0.0": "~0.7.0", "webpack": "~1.14.0" }, "keywords": [ "ast", "ecmascript", "esprima", "javascript", "parser", "syntax" ], "scripts": { "check-version": "node test/check-version.js", "tslint": "tslint src/*.ts", "code-style": "tsfmt --verify src/*.ts && tsfmt --verify test/*.js", "format-code": "tsfmt -r src/*.ts && tsfmt -r test/*.js", "complexity": "node test/check-complexity.js", "static-analysis": "npm run check-version && npm run tslint && npm run code-style && npm run complexity", "hostile-env-tests": "node test/hostile-environment-tests.js", "unit-tests": "node test/unit-tests.js", "api-tests": "mocha -R dot test/api-tests.js", "grammar-tests": "node test/grammar-tests.js", "regression-tests": "node test/regression-tests.js", "all-tests": "npm run verify-line-ending && npm run generate-fixtures && npm run unit-tests && npm run api-tests && npm run grammar-tests && npm run regression-tests && npm run hostile-env-tests", "verify-line-ending": "node test/verify-line-ending.js", "generate-fixtures": "node tools/generate-fixtures.js", "browser-tests": "npm run compile && npm run generate-fixtures && cd test && karma start --single-run", "saucelabs-evergreen": "cd test && karma start saucelabs-evergreen.conf.js", "saucelabs-safari": "cd test && karma start saucelabs-safari.conf.js", "saucelabs-ie": "cd test && karma start saucelabs-ie.conf.js", "saucelabs": "npm run saucelabs-evergreen && npm run saucelabs-ie && npm run saucelabs-safari", "analyze-coverage": "istanbul cover test/unit-tests.js", "check-coverage": "istanbul check-coverage --statement 100 --branch 100 --function 100", "dynamic-analysis": "npm run analyze-coverage && npm run check-coverage", "compile": "tsc -p src/ && webpack && node tools/fixupbundle.js", "test": "npm run compile && npm run all-tests && npm run static-analysis && npm run dynamic-analysis", "prepublish": "npm run compile", "profile": "node --prof test/profile.js && mv isolate*.log v8.log && node-tick-processor", "benchmark-parser": "node -expose_gc test/benchmark-parser.js", "benchmark-tokenizer": "node --expose_gc test/benchmark-tokenizer.js", "benchmark": "npm run benchmark-parser && npm run benchmark-tokenizer", "codecov" : "istanbul report cobertura && codecov < ./coverage/cobertura-coverage.xml", "downstream": "node test/downstream.js", "travis": "npm test", "circleci": "npm test && npm run codecov && npm run downstream", "appveyor": "npm run compile && npm run all-tests && npm run browser-tests", "droneio": "npm run compile && npm run all-tests && npm run saucelabs", "generate-regex": "node tools/generate-identifier-regex.js", "generate-xhtml-entities": "node tools/generate-xhtml-entities.js" } } esprima-4.0.1/src/000077500000000000000000000000001331122015500137345ustar00rootroot00000000000000esprima-4.0.1/src/assert.ts000066400000000000000000000007071331122015500156110ustar00rootroot00000000000000// Ensure the condition is true, otherwise throw an error. // This is only to have a better contract semantic, i.e. another safety net // to catch a logic error. The condition shall be fulfilled in normal case. // Do NOT use this to enforce a certain condition on any user input. export function assert(condition: boolean, message: string): void { /* istanbul ignore if */ if (!condition) { throw new Error('ASSERT: ' + message); } } esprima-4.0.1/src/character.ts000066400000000000000000000414221331122015500162430ustar00rootroot00000000000000// See also tools/generate-unicode-regex.js. const Regex = { // Unicode v8.0.0 NonAsciiIdentifierStart: NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/, // Unicode v8.0.0 NonAsciiIdentifierPart: NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ }; export const Character = { /* tslint:disable:no-bitwise */ fromCodePoint(cp: number): string { return (cp < 0x10000) ? String.fromCharCode(cp) : String.fromCharCode(0xD800 + ((cp - 0x10000) >> 10)) + String.fromCharCode(0xDC00 + ((cp - 0x10000) & 1023)); }, // https://tc39.github.io/ecma262/#sec-white-space isWhiteSpace(cp: number): boolean { return (cp === 0x20) || (cp === 0x09) || (cp === 0x0B) || (cp === 0x0C) || (cp === 0xA0) || (cp >= 0x1680 && [0x1680, 0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F, 0x205F, 0x3000, 0xFEFF].indexOf(cp) >= 0); }, // https://tc39.github.io/ecma262/#sec-line-terminators isLineTerminator(cp: number): boolean { return (cp === 0x0A) || (cp === 0x0D) || (cp === 0x2028) || (cp === 0x2029); }, // https://tc39.github.io/ecma262/#sec-names-and-keywords isIdentifierStart(cp: number): boolean { return (cp === 0x24) || (cp === 0x5F) || // $ (dollar) and _ (underscore) (cp >= 0x41 && cp <= 0x5A) || // A..Z (cp >= 0x61 && cp <= 0x7A) || // a..z (cp === 0x5C) || // \ (backslash) ((cp >= 0x80) && Regex.NonAsciiIdentifierStart.test(Character.fromCodePoint(cp))); }, isIdentifierPart(cp: number): boolean { return (cp === 0x24) || (cp === 0x5F) || // $ (dollar) and _ (underscore) (cp >= 0x41 && cp <= 0x5A) || // A..Z (cp >= 0x61 && cp <= 0x7A) || // a..z (cp >= 0x30 && cp <= 0x39) || // 0..9 (cp === 0x5C) || // \ (backslash) ((cp >= 0x80) && Regex.NonAsciiIdentifierPart.test(Character.fromCodePoint(cp))); }, // https://tc39.github.io/ecma262/#sec-literals-numeric-literals isDecimalDigit(cp: number): boolean { return (cp >= 0x30 && cp <= 0x39); // 0..9 }, isHexDigit(cp: number): boolean { return (cp >= 0x30 && cp <= 0x39) || // 0..9 (cp >= 0x41 && cp <= 0x46) || // A..F (cp >= 0x61 && cp <= 0x66); // a..f }, isOctalDigit(cp: number): boolean { return (cp >= 0x30 && cp <= 0x37); // 0..7 } }; esprima-4.0.1/src/comment-handler.ts000066400000000000000000000125601331122015500173650ustar00rootroot00000000000000import { SourceLocation } from './scanner'; import { Syntax } from './syntax'; interface Comment { type: string; value: string; range?: [number, number]; loc?: SourceLocation; } interface Entry { comment: Comment; start: number; } interface NodeInfo { node: any; start: number; } export class CommentHandler { attach: boolean; comments: Comment[]; stack: NodeInfo[]; leading: Entry[]; trailing: Entry[]; constructor() { this.attach = false; this.comments = []; this.stack = []; this.leading = []; this.trailing = []; } insertInnerComments(node, metadata) { // innnerComments for properties empty block // `function a() {/** comments **\/}` if (node.type === Syntax.BlockStatement && node.body.length === 0) { const innerComments: Comment[] = []; for (let i = this.leading.length - 1; i >= 0; --i) { const entry = this.leading[i]; if (metadata.end.offset >= entry.start) { innerComments.unshift(entry.comment); this.leading.splice(i, 1); this.trailing.splice(i, 1); } } if (innerComments.length) { node.innerComments = innerComments; } } } findTrailingComments(metadata) { let trailingComments: Comment[] = []; if (this.trailing.length > 0) { for (let i = this.trailing.length - 1; i >= 0; --i) { const entry = this.trailing[i]; if (entry.start >= metadata.end.offset) { trailingComments.unshift(entry.comment); } } this.trailing.length = 0; return trailingComments; } const entry = this.stack[this.stack.length - 1]; if (entry && entry.node.trailingComments) { const firstComment = entry.node.trailingComments[0]; if (firstComment && firstComment.range[0] >= metadata.end.offset) { trailingComments = entry.node.trailingComments; delete entry.node.trailingComments; } } return trailingComments; } findLeadingComments(metadata) { const leadingComments: Comment[] = []; let target; while (this.stack.length > 0) { const entry = this.stack[this.stack.length - 1]; if (entry && entry.start >= metadata.start.offset) { target = entry.node; this.stack.pop(); } else { break; } } if (target) { const count = target.leadingComments ? target.leadingComments.length : 0; for (let i = count - 1; i >= 0; --i) { const comment = target.leadingComments[i]; if (comment.range[1] <= metadata.start.offset) { leadingComments.unshift(comment); target.leadingComments.splice(i, 1); } } if (target.leadingComments && target.leadingComments.length === 0) { delete target.leadingComments; } return leadingComments; } for (let i = this.leading.length - 1; i >= 0; --i) { const entry = this.leading[i]; if (entry.start <= metadata.start.offset) { leadingComments.unshift(entry.comment); this.leading.splice(i, 1); } } return leadingComments; } visitNode(node, metadata) { if (node.type === Syntax.Program && node.body.length > 0) { return; } this.insertInnerComments(node, metadata); const trailingComments = this.findTrailingComments(metadata); const leadingComments = this.findLeadingComments(metadata); if (leadingComments.length > 0) { node.leadingComments = leadingComments; } if (trailingComments.length > 0) { node.trailingComments = trailingComments; } this.stack.push({ node: node, start: metadata.start.offset }); } visitComment(node, metadata) { const type = (node.type[0] === 'L') ? 'Line' : 'Block'; const comment: Comment = { type: type, value: node.value }; if (node.range) { comment.range = node.range; } if (node.loc) { comment.loc = node.loc; } this.comments.push(comment); if (this.attach) { const entry: Entry = { comment: { type: type, value: node.value, range: [metadata.start.offset, metadata.end.offset] }, start: metadata.start.offset }; if (node.loc) { entry.comment.loc = node.loc; } node.type = type; this.leading.push(entry); this.trailing.push(entry); } } visit(node, metadata) { if (node.type === 'LineComment') { this.visitComment(node, metadata); } else if (node.type === 'BlockComment') { this.visitComment(node, metadata); } else if (this.attach) { this.visitNode(node, metadata); } } } esprima-4.0.1/src/error-handler.ts000066400000000000000000000035521331122015500170550ustar00rootroot00000000000000/* tslint:disable:max-classes-per-file */ declare class Error { public name: string; public message: string; public index: number; public lineNumber: number; public column: number; public description: string; constructor(message: string); } export class ErrorHandler { readonly errors: Error[]; tolerant: boolean; constructor() { this.errors = []; this.tolerant = false; } recordError(error: Error): void { this.errors.push(error); } tolerate(error): void { if (this.tolerant) { this.recordError(error); } else { throw error; } } constructError(msg: string, column: number): Error { let error = new Error(msg); try { throw error; } catch (base) { /* istanbul ignore else */ if (Object.create && Object.defineProperty) { error = Object.create(base); Object.defineProperty(error, 'column', { value: column }); } } /* istanbul ignore next */ return error; } createError(index: number, line: number, col: number, description: string): Error { const msg = 'Line ' + line + ': ' + description; const error = this.constructError(msg, col); error.index = index; error.lineNumber = line; error.description = description; return error; } throwError(index: number, line: number, col: number, description: string): never { throw this.createError(index, line, col, description); } tolerateError(index: number, line: number, col: number, description: string) { const error = this.createError(index, line, col, description); if (this.tolerant) { this.recordError(error); } else { throw error; } } } esprima-4.0.1/src/esprima.ts000066400000000000000000000102771331122015500157530ustar00rootroot00000000000000/* Copyright JS Foundation and other contributors, https://js.foundation/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ import { CommentHandler } from './comment-handler'; import { JSXParser } from './jsx-parser'; import { Parser } from './parser'; import { Tokenizer } from './tokenizer'; export function parse(code: string, options, delegate) { let commentHandler: CommentHandler | null = null; const proxyDelegate = (node, metadata) => { if (delegate) { delegate(node, metadata); } if (commentHandler) { commentHandler.visit(node, metadata); } }; let parserDelegate = (typeof delegate === 'function') ? proxyDelegate : null; let collectComment = false; if (options) { collectComment = (typeof options.comment === 'boolean' && options.comment); const attachComment = (typeof options.attachComment === 'boolean' && options.attachComment); if (collectComment || attachComment) { commentHandler = new CommentHandler(); commentHandler.attach = attachComment; options.comment = true; parserDelegate = proxyDelegate; } } let isModule = false; if (options && typeof options.sourceType === 'string') { isModule = (options.sourceType === 'module'); } let parser: Parser; if (options && typeof options.jsx === 'boolean' && options.jsx) { parser = new JSXParser(code, options, parserDelegate); } else { parser = new Parser(code, options, parserDelegate); } const program = isModule ? parser.parseModule() : parser.parseScript(); const ast = program as any; if (collectComment && commentHandler) { ast.comments = commentHandler.comments; } if (parser.config.tokens) { ast.tokens = parser.tokens; } if (parser.config.tolerant) { ast.errors = parser.errorHandler.errors; } return ast; } export function parseModule(code: string, options, delegate) { const parsingOptions = options || {}; parsingOptions.sourceType = 'module'; return parse(code, parsingOptions, delegate); } export function parseScript(code: string, options, delegate) { const parsingOptions = options || {}; parsingOptions.sourceType = 'script'; return parse(code, parsingOptions, delegate); } export function tokenize(code: string, options, delegate) { const tokenizer = new Tokenizer(code, options); let tokens; tokens = []; try { while (true) { let token = tokenizer.getNextToken(); if (!token) { break; } if (delegate) { token = delegate(token); } tokens.push(token); } } catch (e) { tokenizer.errorHandler.tolerate(e); } if (tokenizer.errorHandler.tolerant) { tokens.errors = tokenizer.errors(); } return tokens; } export { Syntax } from './syntax'; // Sync with *.json manifests. export const version = '4.0.1'; esprima-4.0.1/src/jsx-nodes.ts000066400000000000000000000073111331122015500162200ustar00rootroot00000000000000import { JSXSyntax } from './jsx-syntax'; import * as Node from './nodes'; export type JSXAttributeName = JSXIdentifier | JSXNamespacedName; export type JSXAttributeValue = Node.Literal | JSXElement | JSXSpreadAttribute | JSXExpressionContainer; export type JSXChild = JSXElement | JSXExpressionContainer | JSXText; export type JSXElementAttribute = JSXAttribute | JSXSpreadAttribute; export type JSXElementName = JSXIdentifier | JSXNamespacedName | JSXMemberExpression; /* tslint:disable:max-classes-per-file */ export class JSXClosingElement { readonly type: string; readonly name: JSXElementName; constructor(name: JSXElementName) { this.type = JSXSyntax.JSXClosingElement; this.name = name; } } export class JSXElement { readonly type: string; readonly openingElement: JSXOpeningElement; readonly children: JSXChild[]; readonly closingElement: JSXClosingElement | null; constructor(openingElement: JSXOpeningElement, children: JSXChild[], closingElement: JSXClosingElement | null) { this.type = JSXSyntax.JSXElement; this.openingElement = openingElement; this.children = children; this.closingElement = closingElement; } } export class JSXEmptyExpression { readonly type: string; constructor() { this.type = JSXSyntax.JSXEmptyExpression; } } export class JSXExpressionContainer { readonly type: string; readonly expression: Node.Expression | JSXEmptyExpression; constructor(expression: Node.Expression | JSXEmptyExpression) { this.type = JSXSyntax.JSXExpressionContainer; this.expression = expression; } } export class JSXIdentifier { readonly type: string; readonly name: string; constructor(name: string) { this.type = JSXSyntax.JSXIdentifier; this.name = name; } } export class JSXMemberExpression { readonly type: string; readonly object: JSXMemberExpression | JSXIdentifier; readonly property: JSXIdentifier; constructor(object: JSXMemberExpression | JSXIdentifier, property: JSXIdentifier) { this.type = JSXSyntax.JSXMemberExpression; this.object = object; this.property = property; } } export class JSXAttribute { readonly type: string; readonly name: JSXAttributeName; readonly value: JSXAttributeValue | null; constructor(name: JSXAttributeName, value: JSXAttributeValue | null) { this.type = JSXSyntax.JSXAttribute; this.name = name; this.value = value; } } export class JSXNamespacedName { readonly type: string; readonly namespace: JSXIdentifier; readonly name: JSXIdentifier; constructor(namespace: JSXIdentifier, name: JSXIdentifier) { this.type = JSXSyntax.JSXNamespacedName; this.namespace = namespace; this.name = name; } } export class JSXOpeningElement { readonly type: string; readonly name: JSXElementName; readonly selfClosing: boolean; readonly attributes: JSXElementAttribute[]; constructor(name: JSXElementName, selfClosing: boolean, attributes: JSXElementAttribute[]) { this.type = JSXSyntax.JSXOpeningElement; this.name = name; this.selfClosing = selfClosing; this.attributes = attributes; } } export class JSXSpreadAttribute { readonly type: string; readonly argument: Node.Expression; constructor(argument: Node.Expression) { this.type = JSXSyntax.JSXSpreadAttribute; this.argument = argument; } } export class JSXText { readonly type: string; readonly value: string; readonly raw: string; constructor(value: string, raw: string) { this.type = JSXSyntax.JSXText; this.value = value; this.raw = raw; } } esprima-4.0.1/src/jsx-parser.ts000066400000000000000000000512011331122015500164010ustar00rootroot00000000000000import { Character } from './character'; import * as JSXNode from './jsx-nodes'; import { JSXSyntax } from './jsx-syntax'; import * as Node from './nodes'; import { Marker, Parser } from './parser'; import { Token, TokenName } from './token'; import { XHTMLEntities } from './xhtml-entities'; interface MetaJSXElement { node: Marker; opening: JSXNode.JSXOpeningElement; closing: JSXNode.JSXClosingElement | null; children: JSXNode.JSXChild[]; } const enum JSXToken { Identifier = 100, Text } interface RawJSXToken { type: Token | JSXToken; value: string; lineNumber: number; lineStart: number; start: number; end: number; } TokenName[JSXToken.Identifier] = 'JSXIdentifier'; TokenName[JSXToken.Text] = 'JSXText'; // Fully qualified element name, e.g. returns "svg:path" function getQualifiedElementName(elementName: JSXNode.JSXElementName): string { let qualifiedName; switch (elementName.type) { case JSXSyntax.JSXIdentifier: const id = elementName as JSXNode.JSXIdentifier; qualifiedName = id.name; break; case JSXSyntax.JSXNamespacedName: const ns = elementName as JSXNode.JSXNamespacedName; qualifiedName = getQualifiedElementName(ns.namespace) + ':' + getQualifiedElementName(ns.name); break; case JSXSyntax.JSXMemberExpression: const expr = elementName as JSXNode.JSXMemberExpression; qualifiedName = getQualifiedElementName(expr.object) + '.' + getQualifiedElementName(expr.property); break; /* istanbul ignore next */ default: break; } return qualifiedName; } export class JSXParser extends Parser { constructor(code: string, options, delegate) { super(code, options, delegate); } parsePrimaryExpression(): Node.Expression | JSXNode.JSXElement { return this.match('<') ? this.parseJSXRoot() : super.parsePrimaryExpression(); } startJSX() { // Unwind the scanner before the lookahead token. this.scanner.index = this.startMarker.index; this.scanner.lineNumber = this.startMarker.line; this.scanner.lineStart = this.startMarker.index - this.startMarker.column; } finishJSX() { // Prime the next lookahead. this.nextToken(); } reenterJSX() { this.startJSX(); this.expectJSX('}'); // Pop the closing '}' added from the lookahead. if (this.config.tokens) { this.tokens.pop(); } } createJSXNode(): Marker { this.collectComments(); return { index: this.scanner.index, line: this.scanner.lineNumber, column: this.scanner.index - this.scanner.lineStart }; } createJSXChildNode(): Marker { return { index: this.scanner.index, line: this.scanner.lineNumber, column: this.scanner.index - this.scanner.lineStart }; } scanXHTMLEntity(quote: string): string { let result = '&'; let valid = true; let terminated = false; let numeric = false; let hex = false; while (!this.scanner.eof() && valid && !terminated) { const ch = this.scanner.source[this.scanner.index]; if (ch === quote) { break; } terminated = (ch === ';'); result += ch; ++this.scanner.index; if (!terminated) { switch (result.length) { case 2: // e.g. '{' numeric = (ch === '#'); break; case 3: if (numeric) { // e.g. 'A' hex = (ch === 'x'); valid = hex || Character.isDecimalDigit(ch.charCodeAt(0)); numeric = numeric && !hex; } break; default: valid = valid && !(numeric && !Character.isDecimalDigit(ch.charCodeAt(0))); valid = valid && !(hex && !Character.isHexDigit(ch.charCodeAt(0))); break; } } } if (valid && terminated && result.length > 2) { // e.g. 'A' becomes just '#x41' const str = result.substr(1, result.length - 2); if (numeric && str.length > 1) { result = String.fromCharCode(parseInt(str.substr(1), 10)); } else if (hex && str.length > 2) { result = String.fromCharCode(parseInt('0' + str.substr(1), 16)); } else if (!numeric && !hex && XHTMLEntities[str]) { result = XHTMLEntities[str]; } } return result; } // Scan the next JSX token. This replaces Scanner#lex when in JSX mode. lexJSX(): RawJSXToken { const cp = this.scanner.source.charCodeAt(this.scanner.index); // < > / : = { } if (cp === 60 || cp === 62 || cp === 47 || cp === 58 || cp === 61 || cp === 123 || cp === 125) { const value = this.scanner.source[this.scanner.index++]; return { type: Token.Punctuator, value: value, lineNumber: this.scanner.lineNumber, lineStart: this.scanner.lineStart, start: this.scanner.index - 1, end: this.scanner.index }; } // " ' if (cp === 34 || cp === 39) { const start = this.scanner.index; const quote = this.scanner.source[this.scanner.index++]; let str = ''; while (!this.scanner.eof()) { const ch = this.scanner.source[this.scanner.index++]; if (ch === quote) { break; } else if (ch === '&') { str += this.scanXHTMLEntity(quote); } else { str += ch; } } return { type: Token.StringLiteral, value: str, lineNumber: this.scanner.lineNumber, lineStart: this.scanner.lineStart, start: start, end: this.scanner.index }; } // ... or . if (cp === 46) { const n1 = this.scanner.source.charCodeAt(this.scanner.index + 1); const n2 = this.scanner.source.charCodeAt(this.scanner.index + 2); const value = (n1 === 46 && n2 === 46) ? '...' : '.'; const start = this.scanner.index; this.scanner.index += value.length; return { type: Token.Punctuator, value: value, lineNumber: this.scanner.lineNumber, lineStart: this.scanner.lineStart, start: start, end: this.scanner.index }; } // ` if (cp === 96) { // Only placeholder, since it will be rescanned as a real assignment expression. return { type: Token.Template, value: '', lineNumber: this.scanner.lineNumber, lineStart: this.scanner.lineStart, start: this.scanner.index, end: this.scanner.index }; } // Identifer can not contain backslash (char code 92). if (Character.isIdentifierStart(cp) && (cp !== 92)) { const start = this.scanner.index; ++this.scanner.index; while (!this.scanner.eof()) { const ch = this.scanner.source.charCodeAt(this.scanner.index); if (Character.isIdentifierPart(ch) && (ch !== 92)) { ++this.scanner.index; } else if (ch === 45) { // Hyphen (char code 45) can be part of an identifier. ++this.scanner.index; } else { break; } } const id = this.scanner.source.slice(start, this.scanner.index); return { type: JSXToken.Identifier, value: id, lineNumber: this.scanner.lineNumber, lineStart: this.scanner.lineStart, start: start, end: this.scanner.index }; } return this.scanner.lex() as RawJSXToken; } nextJSXToken(): RawJSXToken { this.collectComments(); this.startMarker.index = this.scanner.index; this.startMarker.line = this.scanner.lineNumber; this.startMarker.column = this.scanner.index - this.scanner.lineStart; const token = this.lexJSX(); this.lastMarker.index = this.scanner.index; this.lastMarker.line = this.scanner.lineNumber; this.lastMarker.column = this.scanner.index - this.scanner.lineStart; if (this.config.tokens) { this.tokens.push(this.convertToken(token as any)); } return token; } nextJSXText(): RawJSXToken { this.startMarker.index = this.scanner.index; this.startMarker.line = this.scanner.lineNumber; this.startMarker.column = this.scanner.index - this.scanner.lineStart; const start = this.scanner.index; let text = ''; while (!this.scanner.eof()) { const ch = this.scanner.source[this.scanner.index]; if (ch === '{' || ch === '<') { break; } ++this.scanner.index; text += ch; if (Character.isLineTerminator(ch.charCodeAt(0))) { ++this.scanner.lineNumber; if (ch === '\r' && this.scanner.source[this.scanner.index] === '\n') { ++this.scanner.index; } this.scanner.lineStart = this.scanner.index; } } this.lastMarker.index = this.scanner.index; this.lastMarker.line = this.scanner.lineNumber; this.lastMarker.column = this.scanner.index - this.scanner.lineStart; const token = { type: JSXToken.Text, value: text, lineNumber: this.scanner.lineNumber, lineStart: this.scanner.lineStart, start: start, end: this.scanner.index }; if ((text.length > 0) && this.config.tokens) { this.tokens.push(this.convertToken(token as any)); } return token; } peekJSXToken(): RawJSXToken { const state = this.scanner.saveState(); this.scanner.scanComments(); const next = this.lexJSX(); this.scanner.restoreState(state); return next; } // Expect the next JSX token to match the specified punctuator. // If not, an exception will be thrown. expectJSX(value) { const token = this.nextJSXToken(); if (token.type !== Token.Punctuator || token.value !== value) { this.throwUnexpectedToken(token); } } // Return true if the next JSX token matches the specified punctuator. matchJSX(value) { const next = this.peekJSXToken(); return next.type === Token.Punctuator && next.value === value; } parseJSXIdentifier(): JSXNode.JSXIdentifier { const node = this.createJSXNode(); const token = this.nextJSXToken(); if (token.type !== JSXToken.Identifier) { this.throwUnexpectedToken(token); } return this.finalize(node, new JSXNode.JSXIdentifier(token.value)); } parseJSXElementName(): JSXNode.JSXElementName { const node = this.createJSXNode(); let elementName = this.parseJSXIdentifier(); if (this.matchJSX(':')) { const namespace = elementName; this.expectJSX(':'); const name = this.parseJSXIdentifier(); elementName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name)); } else if (this.matchJSX('.')) { while (this.matchJSX('.')) { const object = elementName; this.expectJSX('.'); const property = this.parseJSXIdentifier(); elementName = this.finalize(node, new JSXNode.JSXMemberExpression(object, property)); } } return elementName; } parseJSXAttributeName(): JSXNode.JSXAttributeName { const node = this.createJSXNode(); let attributeName: JSXNode.JSXAttributeName; const identifier = this.parseJSXIdentifier(); if (this.matchJSX(':')) { const namespace = identifier; this.expectJSX(':'); const name = this.parseJSXIdentifier(); attributeName = this.finalize(node, new JSXNode.JSXNamespacedName(namespace, name)); } else { attributeName = identifier; } return attributeName; } parseJSXStringLiteralAttribute(): Node.Literal { const node = this.createJSXNode(); const token = this.nextJSXToken(); if (token.type !== Token.StringLiteral) { this.throwUnexpectedToken(token); } const raw = this.getTokenRaw(token); return this.finalize(node, new Node.Literal(token.value, raw)); } parseJSXExpressionAttribute(): JSXNode.JSXExpressionContainer { const node = this.createJSXNode(); this.expectJSX('{'); this.finishJSX(); if (this.match('}')) { this.tolerateError('JSX attributes must only be assigned a non-empty expression'); } const expression = this.parseAssignmentExpression(); this.reenterJSX(); return this.finalize(node, new JSXNode.JSXExpressionContainer(expression)); } parseJSXAttributeValue(): JSXNode.JSXAttributeValue { return this.matchJSX('{') ? this.parseJSXExpressionAttribute() : this.matchJSX('<') ? this.parseJSXElement() : this.parseJSXStringLiteralAttribute(); } parseJSXNameValueAttribute(): JSXNode.JSXAttribute { const node = this.createJSXNode(); const name = this.parseJSXAttributeName(); let value: JSXNode.JSXAttributeValue | null = null; if (this.matchJSX('=')) { this.expectJSX('='); value = this.parseJSXAttributeValue(); } return this.finalize(node, new JSXNode.JSXAttribute(name, value)); } parseJSXSpreadAttribute(): JSXNode.JSXSpreadAttribute { const node = this.createJSXNode(); this.expectJSX('{'); this.expectJSX('...'); this.finishJSX(); const argument = this.parseAssignmentExpression(); this.reenterJSX(); return this.finalize(node, new JSXNode.JSXSpreadAttribute(argument)); } parseJSXAttributes(): JSXNode.JSXElementAttribute[] { const attributes: JSXNode.JSXElementAttribute[] = []; while (!this.matchJSX('/') && !this.matchJSX('>')) { const attribute = this.matchJSX('{') ? this.parseJSXSpreadAttribute() : this.parseJSXNameValueAttribute(); attributes.push(attribute); } return attributes; } parseJSXOpeningElement(): JSXNode.JSXOpeningElement { const node = this.createJSXNode(); this.expectJSX('<'); const name = this.parseJSXElementName(); const attributes = this.parseJSXAttributes(); const selfClosing = this.matchJSX('/'); if (selfClosing) { this.expectJSX('/'); } this.expectJSX('>'); return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes)); } parseJSXBoundaryElement(): JSXNode.JSXOpeningElement | JSXNode.JSXClosingElement { const node = this.createJSXNode(); this.expectJSX('<'); if (this.matchJSX('/')) { this.expectJSX('/'); const name = this.parseJSXElementName(); this.expectJSX('>'); return this.finalize(node, new JSXNode.JSXClosingElement(name)); } const name = this.parseJSXElementName(); const attributes = this.parseJSXAttributes(); const selfClosing = this.matchJSX('/'); if (selfClosing) { this.expectJSX('/'); } this.expectJSX('>'); return this.finalize(node, new JSXNode.JSXOpeningElement(name, selfClosing, attributes)); } parseJSXEmptyExpression(): JSXNode.JSXEmptyExpression { const node = this.createJSXChildNode(); this.collectComments(); this.lastMarker.index = this.scanner.index; this.lastMarker.line = this.scanner.lineNumber; this.lastMarker.column = this.scanner.index - this.scanner.lineStart; return this.finalize(node, new JSXNode.JSXEmptyExpression()); } parseJSXExpressionContainer(): JSXNode.JSXExpressionContainer { const node = this.createJSXNode(); this.expectJSX('{'); let expression: Node.Expression | JSXNode.JSXEmptyExpression; if (this.matchJSX('}')) { expression = this.parseJSXEmptyExpression(); this.expectJSX('}'); } else { this.finishJSX(); expression = this.parseAssignmentExpression(); this.reenterJSX(); } return this.finalize(node, new JSXNode.JSXExpressionContainer(expression)); } parseJSXChildren(): JSXNode.JSXChild[] { const children: JSXNode.JSXChild[] = []; while (!this.scanner.eof()) { const node = this.createJSXChildNode(); const token = this.nextJSXText(); if (token.start < token.end) { const raw = this.getTokenRaw(token); const child = this.finalize(node, new JSXNode.JSXText(token.value, raw)); children.push(child); } if (this.scanner.source[this.scanner.index] === '{') { const container = this.parseJSXExpressionContainer(); children.push(container); } else { break; } } return children; } parseComplexJSXElement(el: MetaJSXElement): MetaJSXElement { const stack: MetaJSXElement[] = []; while (!this.scanner.eof()) { el.children = el.children.concat(this.parseJSXChildren()); const node = this.createJSXChildNode(); const element = this.parseJSXBoundaryElement(); if (element.type === JSXSyntax.JSXOpeningElement) { const opening = element as JSXNode.JSXOpeningElement; if (opening.selfClosing) { const child = this.finalize(node, new JSXNode.JSXElement(opening, [], null)); el.children.push(child); } else { stack.push(el); el = { node, opening, closing: null, children: [] }; } } if (element.type === JSXSyntax.JSXClosingElement) { el.closing = element as JSXNode.JSXClosingElement; const open = getQualifiedElementName(el.opening.name); const close = getQualifiedElementName(el.closing.name); if (open !== close) { this.tolerateError('Expected corresponding JSX closing tag for %0', open); } if (stack.length > 0) { const child = this.finalize(el.node, new JSXNode.JSXElement(el.opening, el.children, el.closing)); el = stack[stack.length - 1]; el.children.push(child); stack.pop(); } else { break; } } } return el; } parseJSXElement(): JSXNode.JSXElement { const node = this.createJSXNode(); const opening = this.parseJSXOpeningElement(); let children: JSXNode.JSXChild[] = []; let closing: JSXNode.JSXClosingElement | null = null; if (!opening.selfClosing) { const el = this.parseComplexJSXElement({ node, opening, closing, children }); children = el.children; closing = el.closing; } return this.finalize(node, new JSXNode.JSXElement(opening, children, closing)); } parseJSXRoot(): JSXNode.JSXElement { // Pop the opening '<' added from the lookahead. if (this.config.tokens) { this.tokens.pop(); } this.startJSX(); const element = this.parseJSXElement(); this.finishJSX(); return element; } isStartOfExpression(): boolean { return super.isStartOfExpression() || this.match('<'); } } esprima-4.0.1/src/jsx-syntax.ts000066400000000000000000000007371331122015500164430ustar00rootroot00000000000000export const JSXSyntax = { JSXAttribute: 'JSXAttribute', JSXClosingElement: 'JSXClosingElement', JSXElement: 'JSXElement', JSXEmptyExpression: 'JSXEmptyExpression', JSXExpressionContainer: 'JSXExpressionContainer', JSXIdentifier: 'JSXIdentifier', JSXMemberExpression: 'JSXMemberExpression', JSXNamespacedName: 'JSXNamespacedName', JSXOpeningElement: 'JSXOpeningElement', JSXSpreadAttribute: 'JSXSpreadAttribute', JSXText: 'JSXText' }; esprima-4.0.1/src/messages.ts000066400000000000000000000076511331122015500161240ustar00rootroot00000000000000// Error messages should be identical to V8. export const Messages = { BadGetterArity: 'Getter must not have any formal parameters', BadSetterArity: 'Setter must have exactly one formal parameter', BadSetterRestParameter: 'Setter function argument must not be a rest parameter', ConstructorIsAsync: 'Class constructor may not be an async method', ConstructorSpecialMethod: 'Class constructor may not be an accessor', DeclarationMissingInitializer: 'Missing initializer in %0 declaration', DefaultRestParameter: 'Unexpected token =', DuplicateBinding: 'Duplicate binding %0', DuplicateConstructor: 'A class may only have one constructor', DuplicateProtoProperty: 'Duplicate __proto__ fields are not allowed in object literals', ForInOfLoopInitializer: '%0 loop variable declaration may not have an initializer', GeneratorInLegacyContext: 'Generator declarations are not allowed in legacy contexts', IllegalBreak: 'Illegal break statement', IllegalContinue: 'Illegal continue statement', IllegalExportDeclaration: 'Unexpected token', IllegalImportDeclaration: 'Unexpected token', IllegalLanguageModeDirective: 'Illegal \'use strict\' directive in function with non-simple parameter list', IllegalReturn: 'Illegal return statement', InvalidEscapedReservedWord: 'Keyword must not contain escaped characters', InvalidHexEscapeSequence: 'Invalid hexadecimal escape sequence', InvalidLHSInAssignment: 'Invalid left-hand side in assignment', InvalidLHSInForIn: 'Invalid left-hand side in for-in', InvalidLHSInForLoop: 'Invalid left-hand side in for-loop', InvalidModuleSpecifier: 'Unexpected token', InvalidRegExp: 'Invalid regular expression', LetInLexicalBinding: 'let is disallowed as a lexically bound name', MissingFromClause: 'Unexpected token', MultipleDefaultsInSwitch: 'More than one default clause in switch statement', NewlineAfterThrow: 'Illegal newline after throw', NoAsAfterImportNamespace: 'Unexpected token', NoCatchOrFinally: 'Missing catch or finally after try', ParameterAfterRestParameter: 'Rest parameter must be last formal parameter', Redeclaration: '%0 \'%1\' has already been declared', StaticPrototype: 'Classes may not have static property named prototype', StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', StrictDelete: 'Delete of an unqualified identifier in strict mode.', StrictFunction: 'In strict mode code, functions can only be declared at top level or inside a block', StrictFunctionName: 'Function name may not be eval or arguments in strict mode', StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', StrictModeWith: 'Strict mode code may not include a with statement', StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', StrictParamDupe: 'Strict mode function may not have duplicate parameter names', StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', StrictReservedWord: 'Use of future reserved word in strict mode', StrictVarName: 'Variable name may not be eval or arguments in strict mode', TemplateOctalLiteral: 'Octal literals are not allowed in template strings.', UnexpectedEOS: 'Unexpected end of input', UnexpectedIdentifier: 'Unexpected identifier', UnexpectedNumber: 'Unexpected number', UnexpectedReserved: 'Unexpected reserved word', UnexpectedString: 'Unexpected string', UnexpectedTemplate: 'Unexpected quasi %0', UnexpectedToken: 'Unexpected token %0', UnexpectedTokenIllegal: 'Unexpected token ILLEGAL', UnknownLabel: 'Undefined label \'%0\'', UnterminatedRegExp: 'Invalid regular expression: missing /' }; esprima-4.0.1/src/nodes.ts000066400000000000000000000626301331122015500154230ustar00rootroot00000000000000import { Syntax } from './syntax'; export type ArgumentListElement = Expression | SpreadElement; export type ArrayExpressionElement = Expression | SpreadElement | null; export type ArrayPatternElement = AssignmentPattern | BindingIdentifier | BindingPattern | RestElement | null; export type BindingPattern = ArrayPattern | ObjectPattern; export type BindingIdentifier = Identifier; export type Declaration = AsyncFunctionDeclaration | ClassDeclaration | ExportDeclaration | FunctionDeclaration | ImportDeclaration | VariableDeclaration; export type ExportableDefaultDeclaration = BindingIdentifier | BindingPattern | ClassDeclaration | Expression | FunctionDeclaration; export type ExportableNamedDeclaration = AsyncFunctionDeclaration | ClassDeclaration | FunctionDeclaration | VariableDeclaration; export type ExportDeclaration = ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration; export type Expression = ArrayExpression | ArrowFunctionExpression | AssignmentExpression | AsyncArrowFunctionExpression | AsyncFunctionExpression | AwaitExpression | BinaryExpression | CallExpression | ClassExpression | ComputedMemberExpression | ConditionalExpression | Identifier | FunctionExpression | Literal | NewExpression | ObjectExpression | RegexLiteral | SequenceExpression | StaticMemberExpression | TaggedTemplateExpression | ThisExpression | UnaryExpression | UpdateExpression | YieldExpression; export type FunctionParameter = AssignmentPattern | BindingIdentifier | BindingPattern; export type ImportDeclarationSpecifier = ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier; export type Statement = AsyncFunctionDeclaration | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | Directive | ForStatement | ForInStatement | ForOfStatement | FunctionDeclaration | IfStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement; export type PropertyKey = Identifier | Literal; export type PropertyValue = AssignmentPattern | AsyncFunctionExpression | BindingIdentifier | BindingPattern | FunctionExpression; export type StatementListItem = Declaration | Statement; /* tslint:disable:max-classes-per-file */ export class ArrayExpression { readonly type: string; readonly elements: ArrayExpressionElement[]; constructor(elements: ArrayExpressionElement[]) { this.type = Syntax.ArrayExpression; this.elements = elements; } } export class ArrayPattern { readonly type: string; readonly elements: ArrayPatternElement[]; constructor(elements: ArrayPatternElement[]) { this.type = Syntax.ArrayPattern; this.elements = elements; } } export class ArrowFunctionExpression { readonly type: string; readonly id: Identifier | null; readonly params: FunctionParameter[]; readonly body: BlockStatement | Expression; readonly generator: boolean; readonly expression: boolean; readonly async: boolean; constructor(params: FunctionParameter[], body: BlockStatement | Expression, expression: boolean) { this.type = Syntax.ArrowFunctionExpression; this.id = null; this.params = params; this.body = body; this.generator = false; this.expression = expression; this.async = false; } } export class AssignmentExpression { readonly type: string; readonly operator: string; readonly left: Expression; readonly right: Expression; constructor(operator: string, left: Expression, right: Expression) { this.type = Syntax.AssignmentExpression; this.operator = operator; this.left = left; this.right = right; } } export class AssignmentPattern { readonly type: string; readonly left: BindingIdentifier | BindingPattern; readonly right: Expression; constructor(left: BindingIdentifier | BindingPattern, right: Expression) { this.type = Syntax.AssignmentPattern; this.left = left; this.right = right; } } export class AsyncArrowFunctionExpression { readonly type: string; readonly id: Identifier | null; readonly params: FunctionParameter[]; readonly body: BlockStatement | Expression; readonly generator: boolean; readonly expression: boolean; readonly async: boolean; constructor(params: FunctionParameter[], body: BlockStatement | Expression, expression: boolean) { this.type = Syntax.ArrowFunctionExpression; this.id = null; this.params = params; this.body = body; this.generator = false; this.expression = expression; this.async = true; } } export class AsyncFunctionDeclaration { readonly type: string; readonly id: Identifier | null; readonly params: FunctionParameter[]; readonly body: BlockStatement; readonly generator: boolean; readonly expression: boolean; readonly async: boolean; constructor(id: Identifier | null, params: FunctionParameter[], body: BlockStatement) { this.type = Syntax.FunctionDeclaration; this.id = id; this.params = params; this.body = body; this.generator = false; this.expression = false; this.async = true; } } export class AsyncFunctionExpression { readonly type: string; readonly id: Identifier | null; readonly params: FunctionParameter[]; readonly body: BlockStatement; readonly generator: boolean; readonly expression: boolean; readonly async: boolean; constructor(id: Identifier | null, params: FunctionParameter[], body: BlockStatement) { this.type = Syntax.FunctionExpression; this.id = id; this.params = params; this.body = body; this.generator = false; this.expression = false; this.async = true; } } export class AwaitExpression { readonly type: string; readonly argument: Expression; constructor(argument: Expression) { this.type = Syntax.AwaitExpression; this.argument = argument; } } export class BinaryExpression { readonly type: string; readonly operator: string; readonly left: Expression; readonly right: Expression; constructor(operator: string, left: Expression, right: Expression) { const logical = (operator === '||' || operator === '&&'); this.type = logical ? Syntax.LogicalExpression : Syntax.BinaryExpression; this.operator = operator; this.left = left; this.right = right; } } export class BlockStatement { readonly type: string; readonly body: Statement[]; constructor(body) { this.type = Syntax.BlockStatement; this.body = body; } } export class BreakStatement { readonly type: string; readonly label: Identifier | null; constructor(label: Identifier | null) { this.type = Syntax.BreakStatement; this.label = label; } } export class CallExpression { readonly type: string; readonly callee: Expression; readonly arguments: ArgumentListElement[]; constructor(callee, args) { this.type = Syntax.CallExpression; this.callee = callee; this.arguments = args; } } export class CatchClause { readonly type: string; readonly param: BindingIdentifier | BindingPattern; readonly body: BlockStatement; constructor(param: BindingIdentifier | BindingPattern, body: BlockStatement) { this.type = Syntax.CatchClause; this.param = param; this.body = body; } } export class ClassBody { readonly type: string; readonly body: Property[]; constructor(body: Property[]) { this.type = Syntax.ClassBody; this.body = body; } } export class ClassDeclaration { readonly type: string; readonly id: Identifier | null; readonly superClass: Identifier | null; readonly body: ClassBody; constructor(id: Identifier | null, superClass: Identifier | null, body: ClassBody) { this.type = Syntax.ClassDeclaration; this.id = id; this.superClass = superClass; this.body = body; } } export class ClassExpression { readonly type: string; readonly id: Identifier | null; readonly superClass: Identifier | null; readonly body: ClassBody; constructor(id: Identifier | null, superClass: Identifier | null, body: ClassBody) { this.type = Syntax.ClassExpression; this.id = id; this.superClass = superClass; this.body = body; } } export class ComputedMemberExpression { readonly type: string; readonly computed: boolean; readonly object: Expression; readonly property: Expression; constructor(object: Expression, property: Expression) { this.type = Syntax.MemberExpression; this.computed = true; this.object = object; this.property = property; } } export class ConditionalExpression { readonly type: string; readonly test: Expression; readonly consequent: Expression; readonly alternate: Expression; constructor(test: Expression, consequent: Expression, alternate: Expression) { this.type = Syntax.ConditionalExpression; this.test = test; this.consequent = consequent; this.alternate = alternate; } } export class ContinueStatement { readonly type: string; readonly label: Identifier | null; constructor(label: Identifier | null) { this.type = Syntax.ContinueStatement; this.label = label; } } export class DebuggerStatement { readonly type: string; constructor() { this.type = Syntax.DebuggerStatement; } } export class Directive { readonly type: string; readonly expression: Expression; readonly directive: string; constructor(expression: Expression, directive: string) { this.type = Syntax.ExpressionStatement; this.expression = expression; this.directive = directive; } } export class DoWhileStatement { readonly type: string; readonly body: Statement; readonly test: Expression; constructor(body: Statement, test: Expression) { this.type = Syntax.DoWhileStatement; this.body = body; this.test = test; } } export class EmptyStatement { readonly type: string; constructor() { this.type = Syntax.EmptyStatement; } } export class ExportAllDeclaration { readonly type: string; readonly source: Literal; constructor(source: Literal) { this.type = Syntax.ExportAllDeclaration; this.source = source; } } export class ExportDefaultDeclaration { readonly type: string; readonly declaration: ExportableDefaultDeclaration; constructor(declaration: ExportableDefaultDeclaration) { this.type = Syntax.ExportDefaultDeclaration; this.declaration = declaration; } } export class ExportNamedDeclaration { readonly type: string; readonly declaration: ExportableNamedDeclaration | null; readonly specifiers: ExportSpecifier[]; readonly source: Literal | null; constructor(declaration: ExportableNamedDeclaration | null, specifiers: ExportSpecifier[], source: Literal | null) { this.type = Syntax.ExportNamedDeclaration; this.declaration = declaration; this.specifiers = specifiers; this.source = source; } } export class ExportSpecifier { readonly type: string; readonly exported: Identifier; readonly local: Identifier; constructor(local: Identifier, exported: Identifier) { this.type = Syntax.ExportSpecifier; this.exported = exported; this.local = local; } } export class ExpressionStatement { readonly type: string; readonly expression: Expression; constructor(expression: Expression) { this.type = Syntax.ExpressionStatement; this.expression = expression; } } export class ForInStatement { readonly type: string; readonly left: Expression; readonly right: Expression; readonly body: Statement; readonly each: boolean; constructor(left: Expression, right: Expression, body: Statement) { this.type = Syntax.ForInStatement; this.left = left; this.right = right; this.body = body; this.each = false; } } export class ForOfStatement { readonly type: string; readonly left: Expression; readonly right: Expression; readonly body: Statement; constructor(left: Expression, right: Expression, body: Statement) { this.type = Syntax.ForOfStatement; this.left = left; this.right = right; this.body = body; } } export class ForStatement { readonly type: string; readonly init: Expression | null; readonly test: Expression | null; readonly update: Expression | null; body: Statement; constructor(init: Expression | null, test: Expression | null, update: Expression | null, body: Statement) { this.type = Syntax.ForStatement; this.init = init; this.test = test; this.update = update; this.body = body; } } export class FunctionDeclaration { readonly type: string; readonly id: Identifier | null; readonly params: FunctionParameter[]; readonly body: BlockStatement; readonly generator: boolean; readonly expression: boolean; readonly async: boolean; constructor(id: Identifier | null, params: FunctionParameter[], body: BlockStatement, generator: boolean) { this.type = Syntax.FunctionDeclaration; this.id = id; this.params = params; this.body = body; this.generator = generator; this.expression = false; this.async = false; } } export class FunctionExpression { readonly type: string; readonly id: Identifier | null; readonly params: FunctionParameter[]; readonly body: BlockStatement; readonly generator: boolean; readonly expression: boolean; readonly async: boolean; constructor(id: Identifier | null, params: FunctionParameter[], body: BlockStatement, generator: boolean) { this.type = Syntax.FunctionExpression; this.id = id; this.params = params; this.body = body; this.generator = generator; this.expression = false; this.async = false; } } export class Identifier { readonly type: string; readonly name: string; constructor(name) { this.type = Syntax.Identifier; this.name = name; } } export class IfStatement { readonly type: string; readonly test: Expression; readonly consequent: Statement; readonly alternate: Statement | null; constructor(test: Expression, consequent: Statement, alternate: Statement | null) { this.type = Syntax.IfStatement; this.test = test; this.consequent = consequent; this.alternate = alternate; } } export class ImportDeclaration { readonly type: string; readonly specifiers: ImportDeclarationSpecifier[]; readonly source: Literal; constructor(specifiers, source) { this.type = Syntax.ImportDeclaration; this.specifiers = specifiers; this.source = source; } } export class ImportDefaultSpecifier { readonly type: string; readonly local: Identifier; constructor(local: Identifier) { this.type = Syntax.ImportDefaultSpecifier; this.local = local; } } export class ImportNamespaceSpecifier { readonly type: string; readonly local: Identifier; constructor(local: Identifier) { this.type = Syntax.ImportNamespaceSpecifier; this.local = local; } } export class ImportSpecifier { readonly type: string; readonly local: Identifier; readonly imported: Identifier; constructor(local: Identifier, imported: Identifier) { this.type = Syntax.ImportSpecifier; this.local = local; this.imported = imported; } } export class LabeledStatement { readonly type: string; readonly label: Identifier; readonly body: Statement; constructor(label: Identifier, body: Statement) { this.type = Syntax.LabeledStatement; this.label = label; this.body = body; } } export class Literal { readonly type: string; readonly value: boolean | number | string | null; readonly raw: string; constructor(value: boolean | number | string | null, raw: string) { this.type = Syntax.Literal; this.value = value; this.raw = raw; } } export class MetaProperty { readonly type: string; readonly meta: Identifier; readonly property: Identifier; constructor(meta: Identifier, property: Identifier) { this.type = Syntax.MetaProperty; this.meta = meta; this.property = property; } } export class MethodDefinition { readonly type: string; readonly key: Expression | null; readonly computed: boolean; readonly value: AsyncFunctionExpression | FunctionExpression | null; readonly kind: string; readonly static: boolean; constructor(key: Expression | null, computed: boolean, value: AsyncFunctionExpression | FunctionExpression | null, kind: string, isStatic: boolean) { this.type = Syntax.MethodDefinition; this.key = key; this.computed = computed; this.value = value; this.kind = kind; this.static = isStatic; } } export class Module { readonly type: string; readonly body: StatementListItem[]; readonly sourceType: string; constructor(body: StatementListItem[]) { this.type = Syntax.Program; this.body = body; this.sourceType = 'module'; } } export class NewExpression { readonly type: string; readonly callee: Expression; readonly arguments: ArgumentListElement[]; constructor(callee: Expression, args: ArgumentListElement[]) { this.type = Syntax.NewExpression; this.callee = callee; this.arguments = args; } } export class ObjectExpression { readonly type: string; readonly properties: Property[]; constructor(properties: Property[]) { this.type = Syntax.ObjectExpression; this.properties = properties; } } export class ObjectPattern { readonly type: string; readonly properties: Property[]; constructor(properties: Property[]) { this.type = Syntax.ObjectPattern; this.properties = properties; } } export class Property { readonly type: string; readonly key: PropertyKey; readonly computed: boolean; readonly value: PropertyValue | null; readonly kind: string; readonly method: boolean; readonly shorthand: boolean; constructor(kind: string, key: PropertyKey, computed: boolean, value: PropertyValue | null, method: boolean, shorthand: boolean) { this.type = Syntax.Property; this.key = key; this.computed = computed; this.value = value; this.kind = kind; this.method = method; this.shorthand = shorthand; } } export class RegexLiteral { readonly type: string; readonly value: RegExp; readonly raw: string; readonly regex: { pattern: string, flags: string }; constructor(value: RegExp, raw: string, pattern: string, flags: string) { this.type = Syntax.Literal; this.value = value; this.raw = raw; this.regex = { pattern, flags }; } } export class RestElement { readonly type: string; readonly argument: BindingIdentifier | BindingPattern; constructor(argument: BindingIdentifier | BindingPattern) { this.type = Syntax.RestElement; this.argument = argument; } } export class ReturnStatement { readonly type: string; readonly argument: Expression | null; constructor(argument: Expression | null) { this.type = Syntax.ReturnStatement; this.argument = argument; } } export class Script { readonly type: string; readonly body: StatementListItem[]; readonly sourceType: string; constructor(body: StatementListItem[]) { this.type = Syntax.Program; this.body = body; this.sourceType = 'script'; } } export class SequenceExpression { readonly type: string; readonly expressions: Expression[]; constructor(expressions: Expression[]) { this.type = Syntax.SequenceExpression; this.expressions = expressions; } } export class SpreadElement { readonly type: string; readonly argument: Expression; constructor(argument: Expression) { this.type = Syntax.SpreadElement; this.argument = argument; } } export class StaticMemberExpression { readonly type: string; readonly computed: boolean; readonly object: Expression; readonly property: Expression; constructor(object: Expression, property: Expression) { this.type = Syntax.MemberExpression; this.computed = false; this.object = object; this.property = property; } } export class Super { readonly type: string; constructor() { this.type = Syntax.Super; } } export class SwitchCase { readonly type: string; readonly test: Expression | null; readonly consequent: Statement[]; constructor(test: Expression, consequent: Statement[]) { this.type = Syntax.SwitchCase; this.test = test; this.consequent = consequent; } } export class SwitchStatement { readonly type: string; readonly discriminant: Expression; readonly cases: SwitchCase[]; constructor(discriminant: Expression, cases: SwitchCase[]) { this.type = Syntax.SwitchStatement; this.discriminant = discriminant; this.cases = cases; } } export class TaggedTemplateExpression { readonly type: string; readonly tag: Expression; readonly quasi: TemplateLiteral; constructor(tag: Expression, quasi: TemplateLiteral) { this.type = Syntax.TaggedTemplateExpression; this.tag = tag; this.quasi = quasi; } } interface TemplateElementValue { cooked: string; raw: string; } export class TemplateElement { readonly type: string; readonly value: TemplateElementValue; readonly tail: boolean; constructor(value: TemplateElementValue, tail: boolean) { this.type = Syntax.TemplateElement; this.value = value; this.tail = tail; } } export class TemplateLiteral { readonly type: string; readonly quasis: TemplateElement[]; readonly expressions: Expression[]; constructor(quasis: TemplateElement[], expressions: Expression[]) { this.type = Syntax.TemplateLiteral; this.quasis = quasis; this.expressions = expressions; } } export class ThisExpression { readonly type: string; constructor() { this.type = Syntax.ThisExpression; } } export class ThrowStatement { readonly type: string; readonly argument: Expression; constructor(argument: Expression) { this.type = Syntax.ThrowStatement; this.argument = argument; } } export class TryStatement { readonly type: string; readonly block: BlockStatement; readonly handler: CatchClause | null; readonly finalizer: BlockStatement | null; constructor(block: BlockStatement, handler: CatchClause | null, finalizer: BlockStatement | null) { this.type = Syntax.TryStatement; this.block = block; this.handler = handler; this.finalizer = finalizer; } } export class UnaryExpression { readonly type: string; readonly operator: string; readonly argument: Expression; readonly prefix: boolean; constructor(operator, argument) { this.type = Syntax.UnaryExpression; this.operator = operator; this.argument = argument; this.prefix = true; } } export class UpdateExpression { readonly type: string; readonly operator: string; readonly argument: Expression; readonly prefix: boolean; constructor(operator, argument, prefix) { this.type = Syntax.UpdateExpression; this.operator = operator; this.argument = argument; this.prefix = prefix; } } export class VariableDeclaration { readonly type: string; readonly declarations: VariableDeclarator[]; readonly kind: string; constructor(declarations: VariableDeclarator[], kind: string) { this.type = Syntax.VariableDeclaration; this.declarations = declarations; this.kind = kind; } } export class VariableDeclarator { readonly type: string; readonly id: BindingIdentifier | BindingPattern; readonly init: Expression | null; constructor(id: BindingIdentifier | BindingPattern, init: Expression | null) { this.type = Syntax.VariableDeclarator; this.id = id; this.init = init; } } export class WhileStatement { readonly type: string; readonly test: Expression; readonly body: Statement; constructor(test: Expression, body: Statement) { this.type = Syntax.WhileStatement; this.test = test; this.body = body; } } export class WithStatement { readonly type: string; readonly object: Expression; readonly body: Statement; constructor(object: Expression, body: Statement) { this.type = Syntax.WithStatement; this.object = object; this.body = body; } } export class YieldExpression { readonly type: string; readonly argument: Expression | null; readonly delegate: boolean; constructor(argument: Expression | null, delegate: boolean) { this.type = Syntax.YieldExpression; this.argument = argument; this.delegate = delegate; } } esprima-4.0.1/src/parser.ts000066400000000000000000004103641331122015500156100ustar00rootroot00000000000000import { assert } from './assert'; import { ErrorHandler } from './error-handler'; import { Messages } from './messages'; import * as Node from './nodes'; import { Comment, RawToken, Scanner, SourceLocation } from './scanner'; import { Syntax } from './syntax'; import { Token, TokenName } from './token'; interface Config { range: boolean; loc: boolean; source: string | null; tokens: boolean; comment: boolean; tolerant: boolean; } interface Context { isModule: boolean; allowIn: boolean; allowStrictDirective: boolean; allowYield: boolean; await: boolean; firstCoverInitializedNameError: RawToken | null; isAssignmentTarget: boolean; isBindingElement: boolean; inFunctionBody: boolean; inIteration: boolean; inSwitch: boolean; labelSet: any; strict: boolean; } export interface Marker { index: number; line: number; column: number; } const ArrowParameterPlaceHolder = 'ArrowParameterPlaceHolder'; interface ArrowParameterPlaceHolderNode { type: string; params: Node.Expression[]; async: boolean; } interface DeclarationOptions { inFor: boolean; } interface TokenEntry { type: string; value: string; regex?: { pattern: string; flags: string; }; range?: [number, number]; loc?: SourceLocation; } export class Parser { readonly config: Config; readonly delegate: any; readonly errorHandler: ErrorHandler; readonly scanner: Scanner; readonly operatorPrecedence: any; lookahead: RawToken; hasLineTerminator: boolean; context: Context; tokens: any[]; startMarker: Marker; lastMarker: Marker; constructor(code: string, options: any = {}, delegate) { this.config = { range: (typeof options.range === 'boolean') && options.range, loc: (typeof options.loc === 'boolean') && options.loc, source: null, tokens: (typeof options.tokens === 'boolean') && options.tokens, comment: (typeof options.comment === 'boolean') && options.comment, tolerant: (typeof options.tolerant === 'boolean') && options.tolerant }; if (this.config.loc && options.source && options.source !== null) { this.config.source = String(options.source); } this.delegate = delegate; this.errorHandler = new ErrorHandler(); this.errorHandler.tolerant = this.config.tolerant; this.scanner = new Scanner(code, this.errorHandler); this.scanner.trackComment = this.config.comment; this.operatorPrecedence = { ')': 0, ';': 0, ',': 0, '=': 0, ']': 0, '||': 1, '&&': 2, '|': 3, '^': 4, '&': 5, '==': 6, '!=': 6, '===': 6, '!==': 6, '<': 7, '>': 7, '<=': 7, '>=': 7, '<<': 8, '>>': 8, '>>>': 8, '+': 9, '-': 9, '*': 11, '/': 11, '%': 11 }; this.lookahead = { type: Token.EOF, value: '', lineNumber: this.scanner.lineNumber, lineStart: 0, start: 0, end: 0 }; this.hasLineTerminator = false; this.context = { isModule: false, await: false, allowIn: true, allowStrictDirective: true, allowYield: true, firstCoverInitializedNameError: null, isAssignmentTarget: false, isBindingElement: false, inFunctionBody: false, inIteration: false, inSwitch: false, labelSet: {}, strict: false }; this.tokens = []; this.startMarker = { index: 0, line: this.scanner.lineNumber, column: 0 }; this.lastMarker = { index: 0, line: this.scanner.lineNumber, column: 0 }; this.nextToken(); this.lastMarker = { index: this.scanner.index, line: this.scanner.lineNumber, column: this.scanner.index - this.scanner.lineStart }; } throwError(messageFormat: string, ...values): void { const args = Array.prototype.slice.call(arguments, 1); const msg = messageFormat.replace(/%(\d)/g, (whole, idx) => { assert(idx < args.length, 'Message reference must be in range'); return args[idx]; } ); const index = this.lastMarker.index; const line = this.lastMarker.line; const column = this.lastMarker.column + 1; throw this.errorHandler.createError(index, line, column, msg); } tolerateError(messageFormat, ...values) { const args = Array.prototype.slice.call(arguments, 1); const msg = messageFormat.replace(/%(\d)/g, (whole, idx) => { assert(idx < args.length, 'Message reference must be in range'); return args[idx]; } ); const index = this.lastMarker.index; const line = this.scanner.lineNumber; const column = this.lastMarker.column + 1; this.errorHandler.tolerateError(index, line, column, msg); } // Throw an exception because of the token. unexpectedTokenError(token?: any, message?: string): Error { let msg = message || Messages.UnexpectedToken; let value; if (token) { if (!message) { msg = (token.type === Token.EOF) ? Messages.UnexpectedEOS : (token.type === Token.Identifier) ? Messages.UnexpectedIdentifier : (token.type === Token.NumericLiteral) ? Messages.UnexpectedNumber : (token.type === Token.StringLiteral) ? Messages.UnexpectedString : (token.type === Token.Template) ? Messages.UnexpectedTemplate : Messages.UnexpectedToken; if (token.type === Token.Keyword) { if (this.scanner.isFutureReservedWord(token.value)) { msg = Messages.UnexpectedReserved; } else if (this.context.strict && this.scanner.isStrictModeReservedWord(token.value)) { msg = Messages.StrictReservedWord; } } } value = token.value; } else { value = 'ILLEGAL'; } msg = msg.replace('%0', value); if (token && typeof token.lineNumber === 'number') { const index = token.start; const line = token.lineNumber; const lastMarkerLineStart = this.lastMarker.index - this.lastMarker.column; const column = token.start - lastMarkerLineStart + 1; return this.errorHandler.createError(index, line, column, msg); } else { const index = this.lastMarker.index; const line = this.lastMarker.line; const column = this.lastMarker.column + 1; return this.errorHandler.createError(index, line, column, msg); } } throwUnexpectedToken(token?, message?): never { throw this.unexpectedTokenError(token, message); } tolerateUnexpectedToken(token?, message?) { this.errorHandler.tolerate(this.unexpectedTokenError(token, message)); } collectComments() { if (!this.config.comment) { this.scanner.scanComments(); } else { const comments: Comment[] = this.scanner.scanComments(); if (comments.length > 0 && this.delegate) { for (let i = 0; i < comments.length; ++i) { const e: Comment = comments[i]; let node; node = { type: e.multiLine ? 'BlockComment' : 'LineComment', value: this.scanner.source.slice(e.slice[0], e.slice[1]) }; if (this.config.range) { node.range = e.range; } if (this.config.loc) { node.loc = e.loc; } const metadata = { start: { line: e.loc.start.line, column: e.loc.start.column, offset: e.range[0] }, end: { line: e.loc.end.line, column: e.loc.end.column, offset: e.range[1] } }; this.delegate(node, metadata); } } } } // From internal representation to an external structure getTokenRaw(token): string { return this.scanner.source.slice(token.start, token.end); } convertToken(token: RawToken): TokenEntry { const t: TokenEntry = { type: TokenName[token.type], value: this.getTokenRaw(token) }; if (this.config.range) { t.range = [token.start, token.end]; } if (this.config.loc) { t.loc = { start: { line: this.startMarker.line, column: this.startMarker.column }, end: { line: this.scanner.lineNumber, column: this.scanner.index - this.scanner.lineStart } }; } if (token.type === Token.RegularExpression) { const pattern = token.pattern as string; const flags = token.flags as string; t.regex = { pattern, flags }; } return t; } nextToken(): RawToken { const token = this.lookahead; this.lastMarker.index = this.scanner.index; this.lastMarker.line = this.scanner.lineNumber; this.lastMarker.column = this.scanner.index - this.scanner.lineStart; this.collectComments(); if (this.scanner.index !== this.startMarker.index) { this.startMarker.index = this.scanner.index; this.startMarker.line = this.scanner.lineNumber; this.startMarker.column = this.scanner.index - this.scanner.lineStart; } const next = this.scanner.lex(); this.hasLineTerminator = (token.lineNumber !== next.lineNumber); if (next && this.context.strict && next.type === Token.Identifier) { if (this.scanner.isStrictModeReservedWord(next.value as string)) { next.type = Token.Keyword; } } this.lookahead = next; if (this.config.tokens && next.type !== Token.EOF) { this.tokens.push(this.convertToken(next)); } return token; } nextRegexToken(): RawToken { this.collectComments(); const token = this.scanner.scanRegExp(); if (this.config.tokens) { // Pop the previous token, '/' or '/=' // This is added from the lookahead token. this.tokens.pop(); this.tokens.push(this.convertToken(token)); } // Prime the next lookahead. this.lookahead = token; this.nextToken(); return token; } createNode(): Marker { return { index: this.startMarker.index, line: this.startMarker.line, column: this.startMarker.column }; } startNode(token, lastLineStart = 0): Marker { let column = token.start - token.lineStart; let line = token.lineNumber; if (column < 0) { column += lastLineStart; line--; } return { index: token.start, line: line, column: column }; } finalize(marker: Marker, node) { if (this.config.range) { node.range = [marker.index, this.lastMarker.index]; } if (this.config.loc) { node.loc = { start: { line: marker.line, column: marker.column, }, end: { line: this.lastMarker.line, column: this.lastMarker.column } }; if (this.config.source) { node.loc.source = this.config.source; } } if (this.delegate) { const metadata = { start: { line: marker.line, column: marker.column, offset: marker.index }, end: { line: this.lastMarker.line, column: this.lastMarker.column, offset: this.lastMarker.index } }; this.delegate(node, metadata); } return node; } // Expect the next token to match the specified punctuator. // If not, an exception will be thrown. expect(value) { const token = this.nextToken(); if (token.type !== Token.Punctuator || token.value !== value) { this.throwUnexpectedToken(token); } } // Quietly expect a comma when in tolerant mode, otherwise delegates to expect(). expectCommaSeparator() { if (this.config.tolerant) { const token = this.lookahead; if (token.type === Token.Punctuator && token.value === ',') { this.nextToken(); } else if (token.type === Token.Punctuator && token.value === ';') { this.nextToken(); this.tolerateUnexpectedToken(token); } else { this.tolerateUnexpectedToken(token, Messages.UnexpectedToken); } } else { this.expect(','); } } // Expect the next token to match the specified keyword. // If not, an exception will be thrown. expectKeyword(keyword) { const token = this.nextToken(); if (token.type !== Token.Keyword || token.value !== keyword) { this.throwUnexpectedToken(token); } } // Return true if the next token matches the specified punctuator. match(value) { return this.lookahead.type === Token.Punctuator && this.lookahead.value === value; } // Return true if the next token matches the specified keyword matchKeyword(keyword) { return this.lookahead.type === Token.Keyword && this.lookahead.value === keyword; } // Return true if the next token matches the specified contextual keyword // (where an identifier is sometimes a keyword depending on the context) matchContextualKeyword(keyword) { return this.lookahead.type === Token.Identifier && this.lookahead.value === keyword; } // Return true if the next token is an assignment operator matchAssign() { if (this.lookahead.type !== Token.Punctuator) { return false; } const op = this.lookahead.value; return op === '=' || op === '*=' || op === '**=' || op === '/=' || op === '%=' || op === '+=' || op === '-=' || op === '<<=' || op === '>>=' || op === '>>>=' || op === '&=' || op === '^=' || op === '|='; } // Cover grammar support. // // When an assignment expression position starts with an left parenthesis, the determination of the type // of the syntax is to be deferred arbitrarily long until the end of the parentheses pair (plus a lookahead) // or the first comma. This situation also defers the determination of all the expressions nested in the pair. // // There are three productions that can be parsed in a parentheses pair that needs to be determined // after the outermost pair is closed. They are: // // 1. AssignmentExpression // 2. BindingElements // 3. AssignmentTargets // // In order to avoid exponential backtracking, we use two flags to denote if the production can be // binding element or assignment target. // // The three productions have the relationship: // // BindingElements ⊆ AssignmentTargets ⊆ AssignmentExpression // // with a single exception that CoverInitializedName when used directly in an Expression, generates // an early error. Therefore, we need the third state, firstCoverInitializedNameError, to track the // first usage of CoverInitializedName and report it when we reached the end of the parentheses pair. // // isolateCoverGrammar function runs the given parser function with a new cover grammar context, and it does not // effect the current flags. This means the production the parser parses is only used as an expression. Therefore // the CoverInitializedName check is conducted. // // inheritCoverGrammar function runs the given parse function with a new cover grammar context, and it propagates // the flags outside of the parser. This means the production the parser parses is used as a part of a potential // pattern. The CoverInitializedName check is deferred. isolateCoverGrammar(parseFunction) { const previousIsBindingElement = this.context.isBindingElement; const previousIsAssignmentTarget = this.context.isAssignmentTarget; const previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError; this.context.isBindingElement = true; this.context.isAssignmentTarget = true; this.context.firstCoverInitializedNameError = null; const result = parseFunction.call(this); if (this.context.firstCoverInitializedNameError !== null) { this.throwUnexpectedToken(this.context.firstCoverInitializedNameError); } this.context.isBindingElement = previousIsBindingElement; this.context.isAssignmentTarget = previousIsAssignmentTarget; this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError; return result; } inheritCoverGrammar(parseFunction) { const previousIsBindingElement = this.context.isBindingElement; const previousIsAssignmentTarget = this.context.isAssignmentTarget; const previousFirstCoverInitializedNameError = this.context.firstCoverInitializedNameError; this.context.isBindingElement = true; this.context.isAssignmentTarget = true; this.context.firstCoverInitializedNameError = null; const result = parseFunction.call(this); this.context.isBindingElement = this.context.isBindingElement && previousIsBindingElement; this.context.isAssignmentTarget = this.context.isAssignmentTarget && previousIsAssignmentTarget; this.context.firstCoverInitializedNameError = previousFirstCoverInitializedNameError || this.context.firstCoverInitializedNameError; return result; } consumeSemicolon() { if (this.match(';')) { this.nextToken(); } else if (!this.hasLineTerminator) { if (this.lookahead.type !== Token.EOF && !this.match('}')) { this.throwUnexpectedToken(this.lookahead); } this.lastMarker.index = this.startMarker.index; this.lastMarker.line = this.startMarker.line; this.lastMarker.column = this.startMarker.column; } } // https://tc39.github.io/ecma262/#sec-primary-expression parsePrimaryExpression(): Node.Expression { const node = this.createNode(); let expr: Node.Expression; let token, raw; switch (this.lookahead.type) { case Token.Identifier: if ((this.context.isModule || this.context.await) && this.lookahead.value === 'await') { this.tolerateUnexpectedToken(this.lookahead); } expr = this.matchAsyncFunction() ? this.parseFunctionExpression() : this.finalize(node, new Node.Identifier(this.nextToken().value)); break; case Token.NumericLiteral: case Token.StringLiteral: if (this.context.strict && this.lookahead.octal) { this.tolerateUnexpectedToken(this.lookahead, Messages.StrictOctalLiteral); } this.context.isAssignmentTarget = false; this.context.isBindingElement = false; token = this.nextToken(); raw = this.getTokenRaw(token); expr = this.finalize(node, new Node.Literal(token.value, raw)); break; case Token.BooleanLiteral: this.context.isAssignmentTarget = false; this.context.isBindingElement = false; token = this.nextToken(); raw = this.getTokenRaw(token); expr = this.finalize(node, new Node.Literal(token.value === 'true', raw)); break; case Token.NullLiteral: this.context.isAssignmentTarget = false; this.context.isBindingElement = false; token = this.nextToken(); raw = this.getTokenRaw(token); expr = this.finalize(node, new Node.Literal(null, raw)); break; case Token.Template: expr = this.parseTemplateLiteral(); break; case Token.Punctuator: switch (this.lookahead.value) { case '(': this.context.isBindingElement = false; expr = this.inheritCoverGrammar(this.parseGroupExpression); break; case '[': expr = this.inheritCoverGrammar(this.parseArrayInitializer); break; case '{': expr = this.inheritCoverGrammar(this.parseObjectInitializer); break; case '/': case '/=': this.context.isAssignmentTarget = false; this.context.isBindingElement = false; this.scanner.index = this.startMarker.index; token = this.nextRegexToken(); raw = this.getTokenRaw(token); expr = this.finalize(node, new Node.RegexLiteral(token.regex as RegExp, raw, token.pattern, token.flags)); break; default: expr = this.throwUnexpectedToken(this.nextToken()); } break; case Token.Keyword: if (!this.context.strict && this.context.allowYield && this.matchKeyword('yield')) { expr = this.parseIdentifierName(); } else if (!this.context.strict && this.matchKeyword('let')) { expr = this.finalize(node, new Node.Identifier(this.nextToken().value)); } else { this.context.isAssignmentTarget = false; this.context.isBindingElement = false; if (this.matchKeyword('function')) { expr = this.parseFunctionExpression(); } else if (this.matchKeyword('this')) { this.nextToken(); expr = this.finalize(node, new Node.ThisExpression()); } else if (this.matchKeyword('class')) { expr = this.parseClassExpression(); } else { expr = this.throwUnexpectedToken(this.nextToken()); } } break; default: expr = this.throwUnexpectedToken(this.nextToken()); } return expr; } // https://tc39.github.io/ecma262/#sec-array-initializer parseSpreadElement(): Node.SpreadElement { const node = this.createNode(); this.expect('...'); const arg = this.inheritCoverGrammar(this.parseAssignmentExpression); return this.finalize(node, new Node.SpreadElement(arg)); } parseArrayInitializer(): Node.ArrayExpression { const node = this.createNode(); const elements: Node.ArrayExpressionElement[] = []; this.expect('['); while (!this.match(']')) { if (this.match(',')) { this.nextToken(); elements.push(null); } else if (this.match('...')) { const element = this.parseSpreadElement(); if (!this.match(']')) { this.context.isAssignmentTarget = false; this.context.isBindingElement = false; this.expect(','); } elements.push(element); } else { elements.push(this.inheritCoverGrammar(this.parseAssignmentExpression)); if (!this.match(']')) { this.expect(','); } } } this.expect(']'); return this.finalize(node, new Node.ArrayExpression(elements)); } // https://tc39.github.io/ecma262/#sec-object-initializer parsePropertyMethod(params): Node.BlockStatement { this.context.isAssignmentTarget = false; this.context.isBindingElement = false; const previousStrict = this.context.strict; const previousAllowStrictDirective = this.context.allowStrictDirective; this.context.allowStrictDirective = params.simple; const body = this.isolateCoverGrammar(this.parseFunctionSourceElements); if (this.context.strict && params.firstRestricted) { this.tolerateUnexpectedToken(params.firstRestricted, params.message); } if (this.context.strict && params.stricted) { this.tolerateUnexpectedToken(params.stricted, params.message); } this.context.strict = previousStrict; this.context.allowStrictDirective = previousAllowStrictDirective; return body; } parsePropertyMethodFunction(): Node.FunctionExpression { const isGenerator = false; const node = this.createNode(); const previousAllowYield = this.context.allowYield; this.context.allowYield = true; const params = this.parseFormalParameters(); const method = this.parsePropertyMethod(params); this.context.allowYield = previousAllowYield; return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator)); } parsePropertyMethodAsyncFunction(): Node.FunctionExpression { const node = this.createNode(); const previousAllowYield = this.context.allowYield; const previousAwait = this.context.await; this.context.allowYield = false; this.context.await = true; const params = this.parseFormalParameters(); const method = this.parsePropertyMethod(params); this.context.allowYield = previousAllowYield; this.context.await = previousAwait; return this.finalize(node, new Node.AsyncFunctionExpression(null, params.params, method)); } parseObjectPropertyKey(): Node.PropertyKey { const node = this.createNode(); const token = this.nextToken(); let key: Node.PropertyKey; switch (token.type) { case Token.StringLiteral: case Token.NumericLiteral: if (this.context.strict && token.octal) { this.tolerateUnexpectedToken(token, Messages.StrictOctalLiteral); } const raw = this.getTokenRaw(token); key = this.finalize(node, new Node.Literal(token.value as string, raw)); break; case Token.Identifier: case Token.BooleanLiteral: case Token.NullLiteral: case Token.Keyword: key = this.finalize(node, new Node.Identifier(token.value)); break; case Token.Punctuator: if (token.value === '[') { key = this.isolateCoverGrammar(this.parseAssignmentExpression); this.expect(']'); } else { key = this.throwUnexpectedToken(token); } break; default: key = this.throwUnexpectedToken(token); } return key; } isPropertyKey(key, value) { return (key.type === Syntax.Identifier && key.name === value) || (key.type === Syntax.Literal && key.value === value); } parseObjectProperty(hasProto): Node.Property { const node = this.createNode(); const token = this.lookahead; let kind: string; let key: Node.PropertyKey | null = null; let value: Node.PropertyValue | null = null; let computed = false; let method = false; let shorthand = false; let isAsync = false; if (token.type === Token.Identifier) { const id = token.value; this.nextToken(); computed = this.match('['); isAsync = !this.hasLineTerminator && (id === 'async') && !this.match(':') && !this.match('(') && !this.match('*') && !this.match(','); key = isAsync ? this.parseObjectPropertyKey() : this.finalize(node, new Node.Identifier(id)); } else if (this.match('*')) { this.nextToken(); } else { computed = this.match('['); key = this.parseObjectPropertyKey(); } const lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead); if (token.type === Token.Identifier && !isAsync && token.value === 'get' && lookaheadPropertyKey) { kind = 'get'; computed = this.match('['); key = this.parseObjectPropertyKey(); this.context.allowYield = false; value = this.parseGetterMethod(); } else if (token.type === Token.Identifier && !isAsync && token.value === 'set' && lookaheadPropertyKey) { kind = 'set'; computed = this.match('['); key = this.parseObjectPropertyKey(); value = this.parseSetterMethod(); } else if (token.type === Token.Punctuator && token.value === '*' && lookaheadPropertyKey) { kind = 'init'; computed = this.match('['); key = this.parseObjectPropertyKey(); value = this.parseGeneratorMethod(); method = true; } else { if (!key) { this.throwUnexpectedToken(this.lookahead); } kind = 'init'; if (this.match(':') && !isAsync) { if (!computed && this.isPropertyKey(key, '__proto__')) { if (hasProto.value) { this.tolerateError(Messages.DuplicateProtoProperty); } hasProto.value = true; } this.nextToken(); value = this.inheritCoverGrammar(this.parseAssignmentExpression); } else if (this.match('(')) { value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(); method = true; } else if (token.type === Token.Identifier) { const id = this.finalize(node, new Node.Identifier(token.value)); if (this.match('=')) { this.context.firstCoverInitializedNameError = this.lookahead; this.nextToken(); shorthand = true; const init = this.isolateCoverGrammar(this.parseAssignmentExpression); value = this.finalize(node, new Node.AssignmentPattern(id, init)); } else { shorthand = true; value = id; } } else { this.throwUnexpectedToken(this.nextToken()); } } return this.finalize(node, new Node.Property(kind, key as Node.PropertyKey, computed, value, method, shorthand)); } parseObjectInitializer(): Node.ObjectExpression { const node = this.createNode(); this.expect('{'); const properties: Node.Property[] = []; const hasProto = { value: false }; while (!this.match('}')) { properties.push(this.parseObjectProperty(hasProto)); if (!this.match('}')) { this.expectCommaSeparator(); } } this.expect('}'); return this.finalize(node, new Node.ObjectExpression(properties)); } // https://tc39.github.io/ecma262/#sec-template-literals parseTemplateHead(): Node.TemplateElement { assert(this.lookahead.head as boolean, 'Template literal must start with a template head'); const node = this.createNode(); const token = this.nextToken(); const raw = token.value as string; const cooked = token.cooked as string; return this.finalize(node, new Node.TemplateElement({ raw, cooked }, token.tail as boolean)); } parseTemplateElement(): Node.TemplateElement { if (this.lookahead.type !== Token.Template) { this.throwUnexpectedToken(); } const node = this.createNode(); const token = this.nextToken(); const raw = token.value as string; const cooked = token.cooked as string; return this.finalize(node, new Node.TemplateElement({ raw, cooked }, token.tail as boolean)); } parseTemplateLiteral(): Node.TemplateLiteral { const node = this.createNode(); const expressions: Node.Expression[] = []; const quasis: Node.TemplateElement[] = []; let quasi = this.parseTemplateHead(); quasis.push(quasi); while (!quasi.tail) { expressions.push(this.parseExpression()); quasi = this.parseTemplateElement(); quasis.push(quasi); } return this.finalize(node, new Node.TemplateLiteral(quasis, expressions)); } // https://tc39.github.io/ecma262/#sec-grouping-operator reinterpretExpressionAsPattern(expr) { switch (expr.type) { case Syntax.Identifier: case Syntax.MemberExpression: case Syntax.RestElement: case Syntax.AssignmentPattern: break; case Syntax.SpreadElement: expr.type = Syntax.RestElement; this.reinterpretExpressionAsPattern(expr.argument); break; case Syntax.ArrayExpression: expr.type = Syntax.ArrayPattern; for (let i = 0; i < expr.elements.length; i++) { if (expr.elements[i] !== null) { this.reinterpretExpressionAsPattern(expr.elements[i]); } } break; case Syntax.ObjectExpression: expr.type = Syntax.ObjectPattern; for (let i = 0; i < expr.properties.length; i++) { this.reinterpretExpressionAsPattern(expr.properties[i].value); } break; case Syntax.AssignmentExpression: expr.type = Syntax.AssignmentPattern; delete expr.operator; this.reinterpretExpressionAsPattern(expr.left); break; default: // Allow other node type for tolerant parsing. break; } } parseGroupExpression(): ArrowParameterPlaceHolderNode | Node.Expression { let expr; this.expect('('); if (this.match(')')) { this.nextToken(); if (!this.match('=>')) { this.expect('=>'); } expr = { type: ArrowParameterPlaceHolder, params: [], async: false }; } else { const startToken = this.lookahead; const params = []; if (this.match('...')) { expr = this.parseRestElement(params); this.expect(')'); if (!this.match('=>')) { this.expect('=>'); } expr = { type: ArrowParameterPlaceHolder, params: [expr], async: false }; } else { let arrow = false; this.context.isBindingElement = true; expr = this.inheritCoverGrammar(this.parseAssignmentExpression); if (this.match(',')) { const expressions: Node.Expression[] = []; this.context.isAssignmentTarget = false; expressions.push(expr); while (this.lookahead.type !== Token.EOF) { if (!this.match(',')) { break; } this.nextToken(); if (this.match(')')) { this.nextToken(); for (let i = 0; i < expressions.length; i++) { this.reinterpretExpressionAsPattern(expressions[i]); } arrow = true; expr = { type: ArrowParameterPlaceHolder, params: expressions, async: false }; } else if (this.match('...')) { if (!this.context.isBindingElement) { this.throwUnexpectedToken(this.lookahead); } expressions.push(this.parseRestElement(params)); this.expect(')'); if (!this.match('=>')) { this.expect('=>'); } this.context.isBindingElement = false; for (let i = 0; i < expressions.length; i++) { this.reinterpretExpressionAsPattern(expressions[i]); } arrow = true; expr = { type: ArrowParameterPlaceHolder, params: expressions, async: false }; } else { expressions.push(this.inheritCoverGrammar(this.parseAssignmentExpression)); } if (arrow) { break; } } if (!arrow) { expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions)); } } if (!arrow) { this.expect(')'); if (this.match('=>')) { if (expr.type === Syntax.Identifier && expr.name === 'yield') { arrow = true; expr = { type: ArrowParameterPlaceHolder, params: [expr], async: false }; } if (!arrow) { if (!this.context.isBindingElement) { this.throwUnexpectedToken(this.lookahead); } if (expr.type === Syntax.SequenceExpression) { for (let i = 0; i < expr.expressions.length; i++) { this.reinterpretExpressionAsPattern(expr.expressions[i]); } } else { this.reinterpretExpressionAsPattern(expr); } const parameters = (expr.type === Syntax.SequenceExpression ? expr.expressions : [expr]); expr = { type: ArrowParameterPlaceHolder, params: parameters, async: false }; } } this.context.isBindingElement = false; } } } return expr; } // https://tc39.github.io/ecma262/#sec-left-hand-side-expressions parseArguments(): Node.ArgumentListElement[] { this.expect('('); const args: Node.ArgumentListElement[] = []; if (!this.match(')')) { while (true) { const expr = this.match('...') ? this.parseSpreadElement() : this.isolateCoverGrammar(this.parseAssignmentExpression); args.push(expr); if (this.match(')')) { break; } this.expectCommaSeparator(); if (this.match(')')) { break; } } } this.expect(')'); return args; } isIdentifierName(token): boolean { return token.type === Token.Identifier || token.type === Token.Keyword || token.type === Token.BooleanLiteral || token.type === Token.NullLiteral; } parseIdentifierName(): Node.Identifier { const node = this.createNode(); const token = this.nextToken(); if (!this.isIdentifierName(token)) { this.throwUnexpectedToken(token); } return this.finalize(node, new Node.Identifier(token.value)); } parseNewExpression(): Node.MetaProperty | Node.NewExpression { const node = this.createNode(); const id = this.parseIdentifierName(); assert(id.name === 'new', 'New expression must start with `new`'); let expr; if (this.match('.')) { this.nextToken(); if (this.lookahead.type === Token.Identifier && this.context.inFunctionBody && this.lookahead.value === 'target') { const property = this.parseIdentifierName(); expr = new Node.MetaProperty(id, property); } else { this.throwUnexpectedToken(this.lookahead); } } else { const callee = this.isolateCoverGrammar(this.parseLeftHandSideExpression); const args = this.match('(') ? this.parseArguments() : []; expr = new Node.NewExpression(callee, args); this.context.isAssignmentTarget = false; this.context.isBindingElement = false; } return this.finalize(node, expr); } parseAsyncArgument() { const arg = this.parseAssignmentExpression(); this.context.firstCoverInitializedNameError = null; return arg; } parseAsyncArguments(): Node.ArgumentListElement[] { this.expect('('); const args: Node.ArgumentListElement[] = []; if (!this.match(')')) { while (true) { const expr = this.match('...') ? this.parseSpreadElement() : this.isolateCoverGrammar(this.parseAsyncArgument); args.push(expr); if (this.match(')')) { break; } this.expectCommaSeparator(); if (this.match(')')) { break; } } } this.expect(')'); return args; } parseLeftHandSideExpressionAllowCall(): Node.Expression { const startToken = this.lookahead; const maybeAsync = this.matchContextualKeyword('async'); const previousAllowIn = this.context.allowIn; this.context.allowIn = true; let expr; if (this.matchKeyword('super') && this.context.inFunctionBody) { expr = this.createNode(); this.nextToken(); expr = this.finalize(expr, new Node.Super()); if (!this.match('(') && !this.match('.') && !this.match('[')) { this.throwUnexpectedToken(this.lookahead); } } else { expr = this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression); } while (true) { if (this.match('.')) { this.context.isBindingElement = false; this.context.isAssignmentTarget = true; this.expect('.'); const property = this.parseIdentifierName(); expr = this.finalize(this.startNode(startToken), new Node.StaticMemberExpression(expr, property)); } else if (this.match('(')) { const asyncArrow = maybeAsync && (startToken.lineNumber === this.lookahead.lineNumber); this.context.isBindingElement = false; this.context.isAssignmentTarget = false; const args = asyncArrow ? this.parseAsyncArguments() : this.parseArguments(); expr = this.finalize(this.startNode(startToken), new Node.CallExpression(expr, args)); if (asyncArrow && this.match('=>')) { for (let i = 0; i < args.length; ++i) { this.reinterpretExpressionAsPattern(args[i]); } expr = { type: ArrowParameterPlaceHolder, params: args, async: true }; } } else if (this.match('[')) { this.context.isBindingElement = false; this.context.isAssignmentTarget = true; this.expect('['); const property = this.isolateCoverGrammar(this.parseExpression); this.expect(']'); expr = this.finalize(this.startNode(startToken), new Node.ComputedMemberExpression(expr, property)); } else if (this.lookahead.type === Token.Template && this.lookahead.head) { const quasi = this.parseTemplateLiteral(); expr = this.finalize(this.startNode(startToken), new Node.TaggedTemplateExpression(expr, quasi)); } else { break; } } this.context.allowIn = previousAllowIn; return expr; } parseSuper(): Node.Super { const node = this.createNode(); this.expectKeyword('super'); if (!this.match('[') && !this.match('.')) { this.throwUnexpectedToken(this.lookahead); } return this.finalize(node, new Node.Super()); } parseLeftHandSideExpression(): Node.Expression { assert(this.context.allowIn, 'callee of new expression always allow in keyword.'); const node = this.startNode(this.lookahead); let expr = (this.matchKeyword('super') && this.context.inFunctionBody) ? this.parseSuper() : this.inheritCoverGrammar(this.matchKeyword('new') ? this.parseNewExpression : this.parsePrimaryExpression); while (true) { if (this.match('[')) { this.context.isBindingElement = false; this.context.isAssignmentTarget = true; this.expect('['); const property = this.isolateCoverGrammar(this.parseExpression); this.expect(']'); expr = this.finalize(node, new Node.ComputedMemberExpression(expr, property)); } else if (this.match('.')) { this.context.isBindingElement = false; this.context.isAssignmentTarget = true; this.expect('.'); const property = this.parseIdentifierName(); expr = this.finalize(node, new Node.StaticMemberExpression(expr, property)); } else if (this.lookahead.type === Token.Template && this.lookahead.head) { const quasi = this.parseTemplateLiteral(); expr = this.finalize(node, new Node.TaggedTemplateExpression(expr, quasi)); } else { break; } } return expr; } // https://tc39.github.io/ecma262/#sec-update-expressions parseUpdateExpression(): Node.Expression { let expr; const startToken = this.lookahead; if (this.match('++') || this.match('--')) { const node = this.startNode(startToken); const token = this.nextToken(); expr = this.inheritCoverGrammar(this.parseUnaryExpression); if (this.context.strict && expr.type === Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) { this.tolerateError(Messages.StrictLHSPrefix); } if (!this.context.isAssignmentTarget) { this.tolerateError(Messages.InvalidLHSInAssignment); } const prefix = true; expr = this.finalize(node, new Node.UpdateExpression(token.value, expr, prefix)); this.context.isAssignmentTarget = false; this.context.isBindingElement = false; } else { expr = this.inheritCoverGrammar(this.parseLeftHandSideExpressionAllowCall); if (!this.hasLineTerminator && this.lookahead.type === Token.Punctuator) { if (this.match('++') || this.match('--')) { if (this.context.strict && expr.type === Syntax.Identifier && this.scanner.isRestrictedWord(expr.name)) { this.tolerateError(Messages.StrictLHSPostfix); } if (!this.context.isAssignmentTarget) { this.tolerateError(Messages.InvalidLHSInAssignment); } this.context.isAssignmentTarget = false; this.context.isBindingElement = false; const operator = this.nextToken().value; const prefix = false; expr = this.finalize(this.startNode(startToken), new Node.UpdateExpression(operator, expr, prefix)); } } } return expr; } // https://tc39.github.io/ecma262/#sec-unary-operators parseAwaitExpression(): Node.AwaitExpression { const node = this.createNode(); this.nextToken(); const argument = this.parseUnaryExpression(); return this.finalize(node, new Node.AwaitExpression(argument)); } parseUnaryExpression(): Node.Expression { let expr; if (this.match('+') || this.match('-') || this.match('~') || this.match('!') || this.matchKeyword('delete') || this.matchKeyword('void') || this.matchKeyword('typeof')) { const node = this.startNode(this.lookahead); const token = this.nextToken(); expr = this.inheritCoverGrammar(this.parseUnaryExpression); expr = this.finalize(node, new Node.UnaryExpression(token.value, expr)); if (this.context.strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { this.tolerateError(Messages.StrictDelete); } this.context.isAssignmentTarget = false; this.context.isBindingElement = false; } else if (this.context.await && this.matchContextualKeyword('await')) { expr = this.parseAwaitExpression(); } else { expr = this.parseUpdateExpression(); } return expr; } parseExponentiationExpression(): Node.Expression { const startToken = this.lookahead; let expr = this.inheritCoverGrammar(this.parseUnaryExpression); if (expr.type !== Syntax.UnaryExpression && this.match('**')) { this.nextToken(); this.context.isAssignmentTarget = false; this.context.isBindingElement = false; const left = expr; const right = this.isolateCoverGrammar(this.parseExponentiationExpression); expr = this.finalize(this.startNode(startToken), new Node.BinaryExpression('**', left, right)); } return expr; } // https://tc39.github.io/ecma262/#sec-exp-operator // https://tc39.github.io/ecma262/#sec-multiplicative-operators // https://tc39.github.io/ecma262/#sec-additive-operators // https://tc39.github.io/ecma262/#sec-bitwise-shift-operators // https://tc39.github.io/ecma262/#sec-relational-operators // https://tc39.github.io/ecma262/#sec-equality-operators // https://tc39.github.io/ecma262/#sec-binary-bitwise-operators // https://tc39.github.io/ecma262/#sec-binary-logical-operators binaryPrecedence(token): number { const op = token.value; let precedence; if (token.type === Token.Punctuator) { precedence = this.operatorPrecedence[op] || 0; } else if (token.type === Token.Keyword) { precedence = (op === 'instanceof' || (this.context.allowIn && op === 'in')) ? 7 : 0; } else { precedence = 0; } return precedence; } parseBinaryExpression(): Node.Expression { const startToken = this.lookahead; let expr = this.inheritCoverGrammar(this.parseExponentiationExpression); const token = this.lookahead; let prec = this.binaryPrecedence(token); if (prec > 0) { this.nextToken(); this.context.isAssignmentTarget = false; this.context.isBindingElement = false; const markers = [startToken, this.lookahead]; let left = expr; let right = this.isolateCoverGrammar(this.parseExponentiationExpression); const stack = [left, token.value, right]; const precedences: number[] = [prec]; while (true) { prec = this.binaryPrecedence(this.lookahead); if (prec <= 0) { break; } // Reduce: make a binary expression from the three topmost entries. while ((stack.length > 2) && (prec <= precedences[precedences.length - 1])) { right = stack.pop(); const operator = stack.pop(); precedences.pop(); left = stack.pop(); markers.pop(); const node = this.startNode(markers[markers.length - 1]); stack.push(this.finalize(node, new Node.BinaryExpression(operator, left, right))); } // Shift. stack.push(this.nextToken().value); precedences.push(prec); markers.push(this.lookahead); stack.push(this.isolateCoverGrammar(this.parseExponentiationExpression)); } // Final reduce to clean-up the stack. let i = stack.length - 1; expr = stack[i]; let lastMarker = markers.pop(); while (i > 1) { const marker = markers.pop(); const lastLineStart = lastMarker && lastMarker.lineStart; const node = this.startNode(marker, lastLineStart); const operator = stack[i - 1]; expr = this.finalize(node, new Node.BinaryExpression(operator, stack[i - 2], expr)); i -= 2; lastMarker = marker; } } return expr; } // https://tc39.github.io/ecma262/#sec-conditional-operator parseConditionalExpression(): Node.Expression { const startToken = this.lookahead; let expr = this.inheritCoverGrammar(this.parseBinaryExpression); if (this.match('?')) { this.nextToken(); const previousAllowIn = this.context.allowIn; this.context.allowIn = true; const consequent = this.isolateCoverGrammar(this.parseAssignmentExpression); this.context.allowIn = previousAllowIn; this.expect(':'); const alternate = this.isolateCoverGrammar(this.parseAssignmentExpression); expr = this.finalize(this.startNode(startToken), new Node.ConditionalExpression(expr, consequent, alternate)); this.context.isAssignmentTarget = false; this.context.isBindingElement = false; } return expr; } // https://tc39.github.io/ecma262/#sec-assignment-operators checkPatternParam(options, param) { switch (param.type) { case Syntax.Identifier: this.validateParam(options, param, param.name); break; case Syntax.RestElement: this.checkPatternParam(options, param.argument); break; case Syntax.AssignmentPattern: this.checkPatternParam(options, param.left); break; case Syntax.ArrayPattern: for (let i = 0; i < param.elements.length; i++) { if (param.elements[i] !== null) { this.checkPatternParam(options, param.elements[i]); } } break; case Syntax.ObjectPattern: for (let i = 0; i < param.properties.length; i++) { this.checkPatternParam(options, param.properties[i].value); } break; default: break; } options.simple = options.simple && (param instanceof Node.Identifier); } reinterpretAsCoverFormalsList(expr) { let params = [expr]; let options; let asyncArrow = false; switch (expr.type) { case Syntax.Identifier: break; case ArrowParameterPlaceHolder: params = expr.params; asyncArrow = expr.async; break; default: return null; } options = { simple: true, paramSet: {} }; for (let i = 0; i < params.length; ++i) { const param = params[i]; if (param.type === Syntax.AssignmentPattern) { if (param.right.type === Syntax.YieldExpression) { if (param.right.argument) { this.throwUnexpectedToken(this.lookahead); } param.right.type = Syntax.Identifier; param.right.name = 'yield'; delete param.right.argument; delete param.right.delegate; } } else if (asyncArrow && param.type === Syntax.Identifier && param.name === 'await') { this.throwUnexpectedToken(this.lookahead); } this.checkPatternParam(options, param); params[i] = param; } if (this.context.strict || !this.context.allowYield) { for (let i = 0; i < params.length; ++i) { const param = params[i]; if (param.type === Syntax.YieldExpression) { this.throwUnexpectedToken(this.lookahead); } } } if (options.message === Messages.StrictParamDupe) { const token = this.context.strict ? options.stricted : options.firstRestricted; this.throwUnexpectedToken(token, options.message); } return { simple: options.simple, params: params, stricted: options.stricted, firstRestricted: options.firstRestricted, message: options.message }; } parseAssignmentExpression(): Node.Expression { let expr; if (!this.context.allowYield && this.matchKeyword('yield')) { expr = this.parseYieldExpression(); } else { const startToken = this.lookahead; let token = startToken; expr = this.parseConditionalExpression(); if (token.type === Token.Identifier && (token.lineNumber === this.lookahead.lineNumber) && token.value === 'async') { if (this.lookahead.type === Token.Identifier || this.matchKeyword('yield')) { const arg = this.parsePrimaryExpression(); this.reinterpretExpressionAsPattern(arg); expr = { type: ArrowParameterPlaceHolder, params: [arg], async: true }; } } if (expr.type === ArrowParameterPlaceHolder || this.match('=>')) { // https://tc39.github.io/ecma262/#sec-arrow-function-definitions this.context.isAssignmentTarget = false; this.context.isBindingElement = false; const isAsync = expr.async; const list = this.reinterpretAsCoverFormalsList(expr); if (list) { if (this.hasLineTerminator) { this.tolerateUnexpectedToken(this.lookahead); } this.context.firstCoverInitializedNameError = null; const previousStrict = this.context.strict; const previousAllowStrictDirective = this.context.allowStrictDirective; this.context.allowStrictDirective = list.simple; const previousAllowYield = this.context.allowYield; const previousAwait = this.context.await; this.context.allowYield = true; this.context.await = isAsync; const node = this.startNode(startToken); this.expect('=>'); let body: Node.BlockStatement | Node.Expression; if (this.match('{')) { const previousAllowIn = this.context.allowIn; this.context.allowIn = true; body = this.parseFunctionSourceElements(); this.context.allowIn = previousAllowIn; } else { body = this.isolateCoverGrammar(this.parseAssignmentExpression); } const expression = body.type !== Syntax.BlockStatement; if (this.context.strict && list.firstRestricted) { this.throwUnexpectedToken(list.firstRestricted, list.message); } if (this.context.strict && list.stricted) { this.tolerateUnexpectedToken(list.stricted, list.message); } expr = isAsync ? this.finalize(node, new Node.AsyncArrowFunctionExpression(list.params, body, expression)) : this.finalize(node, new Node.ArrowFunctionExpression(list.params, body, expression)); this.context.strict = previousStrict; this.context.allowStrictDirective = previousAllowStrictDirective; this.context.allowYield = previousAllowYield; this.context.await = previousAwait; } } else { if (this.matchAssign()) { if (!this.context.isAssignmentTarget) { this.tolerateError(Messages.InvalidLHSInAssignment); } if (this.context.strict && expr.type === Syntax.Identifier) { const id = expr as Node.Identifier; if (this.scanner.isRestrictedWord(id.name)) { this.tolerateUnexpectedToken(token, Messages.StrictLHSAssignment); } if (this.scanner.isStrictModeReservedWord(id.name)) { this.tolerateUnexpectedToken(token, Messages.StrictReservedWord); } } if (!this.match('=')) { this.context.isAssignmentTarget = false; this.context.isBindingElement = false; } else { this.reinterpretExpressionAsPattern(expr); } token = this.nextToken(); const operator = token.value as string; const right = this.isolateCoverGrammar(this.parseAssignmentExpression); expr = this.finalize(this.startNode(startToken), new Node.AssignmentExpression(operator, expr, right)); this.context.firstCoverInitializedNameError = null; } } } return expr; } // https://tc39.github.io/ecma262/#sec-comma-operator parseExpression(): Node.Expression | Node.SequenceExpression { const startToken = this.lookahead; let expr = this.isolateCoverGrammar(this.parseAssignmentExpression); if (this.match(',')) { const expressions: Node.Expression[] = []; expressions.push(expr); while (this.lookahead.type !== Token.EOF) { if (!this.match(',')) { break; } this.nextToken(); expressions.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); } expr = this.finalize(this.startNode(startToken), new Node.SequenceExpression(expressions)); } return expr; } // https://tc39.github.io/ecma262/#sec-block parseStatementListItem(): Node.StatementListItem { let statement: Node.StatementListItem; this.context.isAssignmentTarget = true; this.context.isBindingElement = true; if (this.lookahead.type === Token.Keyword) { switch (this.lookahead.value) { case 'export': if (!this.context.isModule) { this.tolerateUnexpectedToken(this.lookahead, Messages.IllegalExportDeclaration); } statement = this.parseExportDeclaration(); break; case 'import': if (!this.context.isModule) { this.tolerateUnexpectedToken(this.lookahead, Messages.IllegalImportDeclaration); } statement = this.parseImportDeclaration(); break; case 'const': statement = this.parseLexicalDeclaration({ inFor: false }); break; case 'function': statement = this.parseFunctionDeclaration(); break; case 'class': statement = this.parseClassDeclaration(); break; case 'let': statement = this.isLexicalDeclaration() ? this.parseLexicalDeclaration({ inFor: false }) : this.parseStatement(); break; default: statement = this.parseStatement(); break; } } else { statement = this.parseStatement(); } return statement; } parseBlock(): Node.BlockStatement { const node = this.createNode(); this.expect('{'); const block: Node.StatementListItem[] = []; while (true) { if (this.match('}')) { break; } block.push(this.parseStatementListItem()); } this.expect('}'); return this.finalize(node, new Node.BlockStatement(block)); } // https://tc39.github.io/ecma262/#sec-let-and-const-declarations parseLexicalBinding(kind: string, options): Node.VariableDeclarator { const node = this.createNode(); const params = []; const id = this.parsePattern(params, kind); if (this.context.strict && id.type === Syntax.Identifier) { if (this.scanner.isRestrictedWord((id as Node.Identifier).name)) { this.tolerateError(Messages.StrictVarName); } } let init: Node.Expression | null = null; if (kind === 'const') { if (!this.matchKeyword('in') && !this.matchContextualKeyword('of')) { if (this.match('=')) { this.nextToken(); init = this.isolateCoverGrammar(this.parseAssignmentExpression); } else { this.throwError(Messages.DeclarationMissingInitializer, 'const'); } } } else if ((!options.inFor && id.type !== Syntax.Identifier) || this.match('=')) { this.expect('='); init = this.isolateCoverGrammar(this.parseAssignmentExpression); } return this.finalize(node, new Node.VariableDeclarator(id, init)); } parseBindingList(kind: string, options): Node.VariableDeclarator[] { const list = [this.parseLexicalBinding(kind, options)]; while (this.match(',')) { this.nextToken(); list.push(this.parseLexicalBinding(kind, options)); } return list; } isLexicalDeclaration(): boolean { const state = this.scanner.saveState(); this.scanner.scanComments(); const next = this.scanner.lex(); this.scanner.restoreState(state); return (next.type === Token.Identifier) || (next.type === Token.Punctuator && next.value === '[') || (next.type === Token.Punctuator && next.value === '{') || (next.type === Token.Keyword && next.value === 'let') || (next.type === Token.Keyword && next.value === 'yield'); } parseLexicalDeclaration(options): Node.VariableDeclaration { const node = this.createNode(); const kind = this.nextToken().value as string; assert(kind === 'let' || kind === 'const', 'Lexical declaration must be either let or const'); const declarations = this.parseBindingList(kind, options); this.consumeSemicolon(); return this.finalize(node, new Node.VariableDeclaration(declarations, kind)); } // https://tc39.github.io/ecma262/#sec-destructuring-binding-patterns parseBindingRestElement(params, kind?: string): Node.RestElement { const node = this.createNode(); this.expect('...'); const arg = this.parsePattern(params, kind); return this.finalize(node, new Node.RestElement(arg)); } parseArrayPattern(params, kind?: string): Node.ArrayPattern { const node = this.createNode(); this.expect('['); const elements: Node.ArrayPatternElement[] = []; while (!this.match(']')) { if (this.match(',')) { this.nextToken(); elements.push(null); } else { if (this.match('...')) { elements.push(this.parseBindingRestElement(params, kind)); break; } else { elements.push(this.parsePatternWithDefault(params, kind)); } if (!this.match(']')) { this.expect(','); } } } this.expect(']'); return this.finalize(node, new Node.ArrayPattern(elements)); } parsePropertyPattern(params, kind?: string): Node.Property { const node = this.createNode(); let computed = false; let shorthand = false; const method = false; let key: Node.PropertyKey | null; let value: Node.PropertyValue; if (this.lookahead.type === Token.Identifier) { const keyToken = this.lookahead; key = this.parseVariableIdentifier(); const init = this.finalize(node, new Node.Identifier(keyToken.value)); if (this.match('=')) { params.push(keyToken); shorthand = true; this.nextToken(); const expr = this.parseAssignmentExpression(); value = this.finalize(this.startNode(keyToken), new Node.AssignmentPattern(init, expr)); } else if (!this.match(':')) { params.push(keyToken); shorthand = true; value = init; } else { this.expect(':'); value = this.parsePatternWithDefault(params, kind); } } else { computed = this.match('['); key = this.parseObjectPropertyKey(); this.expect(':'); value = this.parsePatternWithDefault(params, kind); } return this.finalize(node, new Node.Property('init', key, computed, value, method, shorthand)); } parseObjectPattern(params, kind?: string): Node.ObjectPattern { const node = this.createNode(); const properties: Node.Property[] = []; this.expect('{'); while (!this.match('}')) { properties.push(this.parsePropertyPattern(params, kind)); if (!this.match('}')) { this.expect(','); } } this.expect('}'); return this.finalize(node, new Node.ObjectPattern(properties)); } parsePattern(params, kind?: string): Node.BindingIdentifier | Node.BindingPattern { let pattern; if (this.match('[')) { pattern = this.parseArrayPattern(params, kind); } else if (this.match('{')) { pattern = this.parseObjectPattern(params, kind); } else { if (this.matchKeyword('let') && (kind === 'const' || kind === 'let')) { this.tolerateUnexpectedToken(this.lookahead, Messages.LetInLexicalBinding); } params.push(this.lookahead); pattern = this.parseVariableIdentifier(kind); } return pattern; } parsePatternWithDefault(params, kind?: string): Node.AssignmentPattern | Node.BindingIdentifier | Node.BindingPattern { const startToken = this.lookahead; let pattern = this.parsePattern(params, kind); if (this.match('=')) { this.nextToken(); const previousAllowYield = this.context.allowYield; this.context.allowYield = true; const right = this.isolateCoverGrammar(this.parseAssignmentExpression); this.context.allowYield = previousAllowYield; pattern = this.finalize(this.startNode(startToken), new Node.AssignmentPattern(pattern, right)); } return pattern; } // https://tc39.github.io/ecma262/#sec-variable-statement parseVariableIdentifier(kind?: string): Node.Identifier { const node = this.createNode(); const token = this.nextToken(); if (token.type === Token.Keyword && token.value === 'yield') { if (this.context.strict) { this.tolerateUnexpectedToken(token, Messages.StrictReservedWord); } else if (!this.context.allowYield) { this.throwUnexpectedToken(token); } } else if (token.type !== Token.Identifier) { if (this.context.strict && token.type === Token.Keyword && this.scanner.isStrictModeReservedWord(token.value as string)) { this.tolerateUnexpectedToken(token, Messages.StrictReservedWord); } else { if (this.context.strict || token.value !== 'let' || kind !== 'var') { this.throwUnexpectedToken(token); } } } else if ((this.context.isModule || this.context.await) && token.type === Token.Identifier && token.value === 'await') { this.tolerateUnexpectedToken(token); } return this.finalize(node, new Node.Identifier(token.value)); } parseVariableDeclaration(options: DeclarationOptions): Node.VariableDeclarator { const node = this.createNode(); const params = []; const id = this.parsePattern(params, 'var'); if (this.context.strict && id.type === Syntax.Identifier) { if (this.scanner.isRestrictedWord((id as Node.Identifier).name)) { this.tolerateError(Messages.StrictVarName); } } let init = null; if (this.match('=')) { this.nextToken(); init = this.isolateCoverGrammar(this.parseAssignmentExpression); } else if (id.type !== Syntax.Identifier && !options.inFor) { this.expect('='); } return this.finalize(node, new Node.VariableDeclarator(id, init)); } parseVariableDeclarationList(options): Node.VariableDeclarator[] { const opt: DeclarationOptions = { inFor: options.inFor }; const list: Node.VariableDeclarator[] = []; list.push(this.parseVariableDeclaration(opt)); while (this.match(',')) { this.nextToken(); list.push(this.parseVariableDeclaration(opt)); } return list; } parseVariableStatement(): Node.VariableDeclaration { const node = this.createNode(); this.expectKeyword('var'); const declarations = this.parseVariableDeclarationList({ inFor: false }); this.consumeSemicolon(); return this.finalize(node, new Node.VariableDeclaration(declarations, 'var')); } // https://tc39.github.io/ecma262/#sec-empty-statement parseEmptyStatement(): Node.EmptyStatement { const node = this.createNode(); this.expect(';'); return this.finalize(node, new Node.EmptyStatement()); } // https://tc39.github.io/ecma262/#sec-expression-statement parseExpressionStatement(): Node.ExpressionStatement { const node = this.createNode(); const expr = this.parseExpression(); this.consumeSemicolon(); return this.finalize(node, new Node.ExpressionStatement(expr)); } // https://tc39.github.io/ecma262/#sec-if-statement parseIfClause(): Node.Statement { if (this.context.strict && this.matchKeyword('function')) { this.tolerateError(Messages.StrictFunction); } return this.parseStatement(); } parseIfStatement(): Node.IfStatement { const node = this.createNode(); let consequent: Node.Statement; let alternate: Node.Statement | null = null; this.expectKeyword('if'); this.expect('('); const test = this.parseExpression(); if (!this.match(')') && this.config.tolerant) { this.tolerateUnexpectedToken(this.nextToken()); consequent = this.finalize(this.createNode(), new Node.EmptyStatement()); } else { this.expect(')'); consequent = this.parseIfClause(); if (this.matchKeyword('else')) { this.nextToken(); alternate = this.parseIfClause(); } } return this.finalize(node, new Node.IfStatement(test, consequent, alternate)); } // https://tc39.github.io/ecma262/#sec-do-while-statement parseDoWhileStatement(): Node.DoWhileStatement { const node = this.createNode(); this.expectKeyword('do'); const previousInIteration = this.context.inIteration; this.context.inIteration = true; const body = this.parseStatement(); this.context.inIteration = previousInIteration; this.expectKeyword('while'); this.expect('('); const test = this.parseExpression(); if (!this.match(')') && this.config.tolerant) { this.tolerateUnexpectedToken(this.nextToken()); } else { this.expect(')'); if (this.match(';')) { this.nextToken(); } } return this.finalize(node, new Node.DoWhileStatement(body, test)); } // https://tc39.github.io/ecma262/#sec-while-statement parseWhileStatement(): Node.WhileStatement { const node = this.createNode(); let body; this.expectKeyword('while'); this.expect('('); const test = this.parseExpression(); if (!this.match(')') && this.config.tolerant) { this.tolerateUnexpectedToken(this.nextToken()); body = this.finalize(this.createNode(), new Node.EmptyStatement()); } else { this.expect(')'); const previousInIteration = this.context.inIteration; this.context.inIteration = true; body = this.parseStatement(); this.context.inIteration = previousInIteration; } return this.finalize(node, new Node.WhileStatement(test, body)); } // https://tc39.github.io/ecma262/#sec-for-statement // https://tc39.github.io/ecma262/#sec-for-in-and-for-of-statements parseForStatement(): Node.ForStatement | Node.ForInStatement | Node.ForOfStatement { let init: any = null; let test: Node.Expression | null = null; let update: Node.Expression | null = null; let forIn = true; let left, right; const node = this.createNode(); this.expectKeyword('for'); this.expect('('); if (this.match(';')) { this.nextToken(); } else { if (this.matchKeyword('var')) { init = this.createNode(); this.nextToken(); const previousAllowIn = this.context.allowIn; this.context.allowIn = false; const declarations = this.parseVariableDeclarationList({ inFor: true }); this.context.allowIn = previousAllowIn; if (declarations.length === 1 && this.matchKeyword('in')) { const decl = declarations[0]; if (decl.init && (decl.id.type === Syntax.ArrayPattern || decl.id.type === Syntax.ObjectPattern || this.context.strict)) { this.tolerateError(Messages.ForInOfLoopInitializer, 'for-in'); } init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); this.nextToken(); left = init; right = this.parseExpression(); init = null; } else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) { init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); this.nextToken(); left = init; right = this.parseAssignmentExpression(); init = null; forIn = false; } else { init = this.finalize(init, new Node.VariableDeclaration(declarations, 'var')); this.expect(';'); } } else if (this.matchKeyword('const') || this.matchKeyword('let')) { init = this.createNode(); const kind = this.nextToken().value as string; if (!this.context.strict && this.lookahead.value === 'in') { init = this.finalize(init, new Node.Identifier(kind)); this.nextToken(); left = init; right = this.parseExpression(); init = null; } else { const previousAllowIn = this.context.allowIn; this.context.allowIn = false; const declarations = this.parseBindingList(kind, { inFor: true }); this.context.allowIn = previousAllowIn; if (declarations.length === 1 && declarations[0].init === null && this.matchKeyword('in')) { init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); this.nextToken(); left = init; right = this.parseExpression(); init = null; } else if (declarations.length === 1 && declarations[0].init === null && this.matchContextualKeyword('of')) { init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); this.nextToken(); left = init; right = this.parseAssignmentExpression(); init = null; forIn = false; } else { this.consumeSemicolon(); init = this.finalize(init, new Node.VariableDeclaration(declarations, kind)); } } } else { const initStartToken = this.lookahead; const previousAllowIn = this.context.allowIn; this.context.allowIn = false; init = this.inheritCoverGrammar(this.parseAssignmentExpression); this.context.allowIn = previousAllowIn; if (this.matchKeyword('in')) { if (!this.context.isAssignmentTarget || init.type === Syntax.AssignmentExpression) { this.tolerateError(Messages.InvalidLHSInForIn); } this.nextToken(); this.reinterpretExpressionAsPattern(init); left = init; right = this.parseExpression(); init = null; } else if (this.matchContextualKeyword('of')) { if (!this.context.isAssignmentTarget || init.type === Syntax.AssignmentExpression) { this.tolerateError(Messages.InvalidLHSInForLoop); } this.nextToken(); this.reinterpretExpressionAsPattern(init); left = init; right = this.parseAssignmentExpression(); init = null; forIn = false; } else { if (this.match(',')) { const initSeq = [init]; while (this.match(',')) { this.nextToken(); initSeq.push(this.isolateCoverGrammar(this.parseAssignmentExpression)); } init = this.finalize(this.startNode(initStartToken), new Node.SequenceExpression(initSeq)); } this.expect(';'); } } } if (typeof left === 'undefined') { if (!this.match(';')) { test = this.parseExpression(); } this.expect(';'); if (!this.match(')')) { update = this.parseExpression(); } } let body; if (!this.match(')') && this.config.tolerant) { this.tolerateUnexpectedToken(this.nextToken()); body = this.finalize(this.createNode(), new Node.EmptyStatement()); } else { this.expect(')'); const previousInIteration = this.context.inIteration; this.context.inIteration = true; body = this.isolateCoverGrammar(this.parseStatement); this.context.inIteration = previousInIteration; } return (typeof left === 'undefined') ? this.finalize(node, new Node.ForStatement(init, test, update, body)) : forIn ? this.finalize(node, new Node.ForInStatement(left, right, body)) : this.finalize(node, new Node.ForOfStatement(left, right, body)); } // https://tc39.github.io/ecma262/#sec-continue-statement parseContinueStatement(): Node.ContinueStatement { const node = this.createNode(); this.expectKeyword('continue'); let label: Node.Identifier | null = null; if (this.lookahead.type === Token.Identifier && !this.hasLineTerminator) { const id = this.parseVariableIdentifier(); label = id; const key = '$' + id.name; if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { this.throwError(Messages.UnknownLabel, id.name); } } this.consumeSemicolon(); if (label === null && !this.context.inIteration) { this.throwError(Messages.IllegalContinue); } return this.finalize(node, new Node.ContinueStatement(label)); } // https://tc39.github.io/ecma262/#sec-break-statement parseBreakStatement(): Node.BreakStatement { const node = this.createNode(); this.expectKeyword('break'); let label: Node.Identifier | null = null; if (this.lookahead.type === Token.Identifier && !this.hasLineTerminator) { const id = this.parseVariableIdentifier(); const key = '$' + id.name; if (!Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { this.throwError(Messages.UnknownLabel, id.name); } label = id; } this.consumeSemicolon(); if (label === null && !this.context.inIteration && !this.context.inSwitch) { this.throwError(Messages.IllegalBreak); } return this.finalize(node, new Node.BreakStatement(label)); } // https://tc39.github.io/ecma262/#sec-return-statement parseReturnStatement(): Node.ReturnStatement { if (!this.context.inFunctionBody) { this.tolerateError(Messages.IllegalReturn); } const node = this.createNode(); this.expectKeyword('return'); const hasArgument = (!this.match(';') && !this.match('}') && !this.hasLineTerminator && this.lookahead.type !== Token.EOF) || this.lookahead.type === Token.StringLiteral || this.lookahead.type === Token.Template; const argument = hasArgument ? this.parseExpression() : null; this.consumeSemicolon(); return this.finalize(node, new Node.ReturnStatement(argument)); } // https://tc39.github.io/ecma262/#sec-with-statement parseWithStatement(): Node.WithStatement { if (this.context.strict) { this.tolerateError(Messages.StrictModeWith); } const node = this.createNode(); let body; this.expectKeyword('with'); this.expect('('); const object = this.parseExpression(); if (!this.match(')') && this.config.tolerant) { this.tolerateUnexpectedToken(this.nextToken()); body = this.finalize(this.createNode(), new Node.EmptyStatement()); } else { this.expect(')'); body = this.parseStatement(); } return this.finalize(node, new Node.WithStatement(object, body)); } // https://tc39.github.io/ecma262/#sec-switch-statement parseSwitchCase(): Node.SwitchCase { const node = this.createNode(); let test; if (this.matchKeyword('default')) { this.nextToken(); test = null; } else { this.expectKeyword('case'); test = this.parseExpression(); } this.expect(':'); const consequent: Node.StatementListItem[] = []; while (true) { if (this.match('}') || this.matchKeyword('default') || this.matchKeyword('case')) { break; } consequent.push(this.parseStatementListItem()); } return this.finalize(node, new Node.SwitchCase(test, consequent)); } parseSwitchStatement(): Node.SwitchStatement { const node = this.createNode(); this.expectKeyword('switch'); this.expect('('); const discriminant = this.parseExpression(); this.expect(')'); const previousInSwitch = this.context.inSwitch; this.context.inSwitch = true; const cases: Node.SwitchCase[] = []; let defaultFound = false; this.expect('{'); while (true) { if (this.match('}')) { break; } const clause = this.parseSwitchCase(); if (clause.test === null) { if (defaultFound) { this.throwError(Messages.MultipleDefaultsInSwitch); } defaultFound = true; } cases.push(clause); } this.expect('}'); this.context.inSwitch = previousInSwitch; return this.finalize(node, new Node.SwitchStatement(discriminant, cases)); } // https://tc39.github.io/ecma262/#sec-labelled-statements parseLabelledStatement(): Node.LabeledStatement | Node.ExpressionStatement { const node = this.createNode(); const expr = this.parseExpression(); let statement: Node.ExpressionStatement | Node.LabeledStatement; if ((expr.type === Syntax.Identifier) && this.match(':')) { this.nextToken(); const id = expr as Node.Identifier; const key = '$' + id.name; if (Object.prototype.hasOwnProperty.call(this.context.labelSet, key)) { this.throwError(Messages.Redeclaration, 'Label', id.name); } this.context.labelSet[key] = true; let body: Node.Statement; if (this.matchKeyword('class')) { this.tolerateUnexpectedToken(this.lookahead); body = this.parseClassDeclaration(); } else if (this.matchKeyword('function')) { const token = this.lookahead; const declaration = this.parseFunctionDeclaration(); if (this.context.strict) { this.tolerateUnexpectedToken(token, Messages.StrictFunction); } else if (declaration.generator) { this.tolerateUnexpectedToken(token, Messages.GeneratorInLegacyContext); } body = declaration; } else { body = this.parseStatement(); } delete this.context.labelSet[key]; statement = new Node.LabeledStatement(id, body); } else { this.consumeSemicolon(); statement = new Node.ExpressionStatement(expr); } return this.finalize(node, statement); } // https://tc39.github.io/ecma262/#sec-throw-statement parseThrowStatement(): Node.ThrowStatement { const node = this.createNode(); this.expectKeyword('throw'); if (this.hasLineTerminator) { this.throwError(Messages.NewlineAfterThrow); } const argument = this.parseExpression(); this.consumeSemicolon(); return this.finalize(node, new Node.ThrowStatement(argument)); } // https://tc39.github.io/ecma262/#sec-try-statement parseCatchClause(): Node.CatchClause { const node = this.createNode(); this.expectKeyword('catch'); this.expect('('); if (this.match(')')) { this.throwUnexpectedToken(this.lookahead); } const params: any[] = []; const param = this.parsePattern(params); const paramMap = {}; for (let i = 0; i < params.length; i++) { const key = '$' + params[i].value; if (Object.prototype.hasOwnProperty.call(paramMap, key)) { this.tolerateError(Messages.DuplicateBinding, params[i].value); } paramMap[key] = true; } if (this.context.strict && param.type === Syntax.Identifier) { if (this.scanner.isRestrictedWord((param as Node.Identifier).name)) { this.tolerateError(Messages.StrictCatchVariable); } } this.expect(')'); const body = this.parseBlock(); return this.finalize(node, new Node.CatchClause(param, body)); } parseFinallyClause(): Node.BlockStatement { this.expectKeyword('finally'); return this.parseBlock(); } parseTryStatement(): Node.TryStatement { const node = this.createNode(); this.expectKeyword('try'); const block = this.parseBlock(); const handler = this.matchKeyword('catch') ? this.parseCatchClause() : null; const finalizer = this.matchKeyword('finally') ? this.parseFinallyClause() : null; if (!handler && !finalizer) { this.throwError(Messages.NoCatchOrFinally); } return this.finalize(node, new Node.TryStatement(block, handler, finalizer)); } // https://tc39.github.io/ecma262/#sec-debugger-statement parseDebuggerStatement(): Node.DebuggerStatement { const node = this.createNode(); this.expectKeyword('debugger'); this.consumeSemicolon(); return this.finalize(node, new Node.DebuggerStatement()); } // https://tc39.github.io/ecma262/#sec-ecmascript-language-statements-and-declarations parseStatement(): Node.Statement { let statement: Node.Statement; switch (this.lookahead.type) { case Token.BooleanLiteral: case Token.NullLiteral: case Token.NumericLiteral: case Token.StringLiteral: case Token.Template: case Token.RegularExpression: statement = this.parseExpressionStatement(); break; case Token.Punctuator: const value = this.lookahead.value; if (value === '{') { statement = this.parseBlock(); } else if (value === '(') { statement = this.parseExpressionStatement(); } else if (value === ';') { statement = this.parseEmptyStatement(); } else { statement = this.parseExpressionStatement(); } break; case Token.Identifier: statement = this.matchAsyncFunction() ? this.parseFunctionDeclaration() : this.parseLabelledStatement(); break; case Token.Keyword: switch (this.lookahead.value) { case 'break': statement = this.parseBreakStatement(); break; case 'continue': statement = this.parseContinueStatement(); break; case 'debugger': statement = this.parseDebuggerStatement(); break; case 'do': statement = this.parseDoWhileStatement(); break; case 'for': statement = this.parseForStatement(); break; case 'function': statement = this.parseFunctionDeclaration(); break; case 'if': statement = this.parseIfStatement(); break; case 'return': statement = this.parseReturnStatement(); break; case 'switch': statement = this.parseSwitchStatement(); break; case 'throw': statement = this.parseThrowStatement(); break; case 'try': statement = this.parseTryStatement(); break; case 'var': statement = this.parseVariableStatement(); break; case 'while': statement = this.parseWhileStatement(); break; case 'with': statement = this.parseWithStatement(); break; default: statement = this.parseExpressionStatement(); break; } break; default: statement = this.throwUnexpectedToken(this.lookahead); } return statement; } // https://tc39.github.io/ecma262/#sec-function-definitions parseFunctionSourceElements(): Node.BlockStatement { const node = this.createNode(); this.expect('{'); const body = this.parseDirectivePrologues(); const previousLabelSet = this.context.labelSet; const previousInIteration = this.context.inIteration; const previousInSwitch = this.context.inSwitch; const previousInFunctionBody = this.context.inFunctionBody; this.context.labelSet = {}; this.context.inIteration = false; this.context.inSwitch = false; this.context.inFunctionBody = true; while (this.lookahead.type !== Token.EOF) { if (this.match('}')) { break; } body.push(this.parseStatementListItem()); } this.expect('}'); this.context.labelSet = previousLabelSet; this.context.inIteration = previousInIteration; this.context.inSwitch = previousInSwitch; this.context.inFunctionBody = previousInFunctionBody; return this.finalize(node, new Node.BlockStatement(body)); } validateParam(options, param, name) { const key = '$' + name; if (this.context.strict) { if (this.scanner.isRestrictedWord(name)) { options.stricted = param; options.message = Messages.StrictParamName; } if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { options.stricted = param; options.message = Messages.StrictParamDupe; } } else if (!options.firstRestricted) { if (this.scanner.isRestrictedWord(name)) { options.firstRestricted = param; options.message = Messages.StrictParamName; } else if (this.scanner.isStrictModeReservedWord(name)) { options.firstRestricted = param; options.message = Messages.StrictReservedWord; } else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { options.stricted = param; options.message = Messages.StrictParamDupe; } } /* istanbul ignore next */ if (typeof Object.defineProperty === 'function') { Object.defineProperty(options.paramSet, key, { value: true, enumerable: true, writable: true, configurable: true }); } else { options.paramSet[key] = true; } } parseRestElement(params): Node.RestElement { const node = this.createNode(); this.expect('...'); const arg = this.parsePattern(params); if (this.match('=')) { this.throwError(Messages.DefaultRestParameter); } if (!this.match(')')) { this.throwError(Messages.ParameterAfterRestParameter); } return this.finalize(node, new Node.RestElement(arg)); } parseFormalParameter(options) { const params: any[] = []; const param = this.match('...') ? this.parseRestElement(params) : this.parsePatternWithDefault(params); for (let i = 0; i < params.length; i++) { this.validateParam(options, params[i], params[i].value); } options.simple = options.simple && (param instanceof Node.Identifier); options.params.push(param); } parseFormalParameters(firstRestricted?) { let options; options = { simple: true, params: [], firstRestricted: firstRestricted }; this.expect('('); if (!this.match(')')) { options.paramSet = {}; while (this.lookahead.type !== Token.EOF) { this.parseFormalParameter(options); if (this.match(')')) { break; } this.expect(','); if (this.match(')')) { break; } } } this.expect(')'); return { simple: options.simple, params: options.params, stricted: options.stricted, firstRestricted: options.firstRestricted, message: options.message }; } matchAsyncFunction(): boolean { let match = this.matchContextualKeyword('async'); if (match) { const state = this.scanner.saveState(); this.scanner.scanComments(); const next = this.scanner.lex(); this.scanner.restoreState(state); match = (state.lineNumber === next.lineNumber) && (next.type === Token.Keyword) && (next.value === 'function'); } return match; } parseFunctionDeclaration(identifierIsOptional?: boolean): Node.AsyncFunctionDeclaration | Node.FunctionDeclaration { const node = this.createNode(); const isAsync = this.matchContextualKeyword('async'); if (isAsync) { this.nextToken(); } this.expectKeyword('function'); const isGenerator = isAsync ? false : this.match('*'); if (isGenerator) { this.nextToken(); } let message; let id: Node.Identifier | null = null; let firstRestricted: RawToken | null = null; if (!identifierIsOptional || !this.match('(')) { const token = this.lookahead; id = this.parseVariableIdentifier(); if (this.context.strict) { if (this.scanner.isRestrictedWord(token.value as string)) { this.tolerateUnexpectedToken(token, Messages.StrictFunctionName); } } else { if (this.scanner.isRestrictedWord(token.value as string)) { firstRestricted = token; message = Messages.StrictFunctionName; } else if (this.scanner.isStrictModeReservedWord(token.value as string)) { firstRestricted = token; message = Messages.StrictReservedWord; } } } const previousAllowAwait = this.context.await; const previousAllowYield = this.context.allowYield; this.context.await = isAsync; this.context.allowYield = !isGenerator; const formalParameters = this.parseFormalParameters(firstRestricted); const params = formalParameters.params; const stricted = formalParameters.stricted; firstRestricted = formalParameters.firstRestricted; if (formalParameters.message) { message = formalParameters.message; } const previousStrict = this.context.strict; const previousAllowStrictDirective = this.context.allowStrictDirective; this.context.allowStrictDirective = formalParameters.simple; const body = this.parseFunctionSourceElements(); if (this.context.strict && firstRestricted) { this.throwUnexpectedToken(firstRestricted, message); } if (this.context.strict && stricted) { this.tolerateUnexpectedToken(stricted, message); } this.context.strict = previousStrict; this.context.allowStrictDirective = previousAllowStrictDirective; this.context.await = previousAllowAwait; this.context.allowYield = previousAllowYield; return isAsync ? this.finalize(node, new Node.AsyncFunctionDeclaration(id, params, body)) : this.finalize(node, new Node.FunctionDeclaration(id, params, body, isGenerator)); } parseFunctionExpression(): Node.AsyncFunctionExpression | Node.FunctionExpression { const node = this.createNode(); const isAsync = this.matchContextualKeyword('async'); if (isAsync) { this.nextToken(); } this.expectKeyword('function'); const isGenerator = isAsync ? false : this.match('*'); if (isGenerator) { this.nextToken(); } let message; let id: Node.Identifier | null = null; let firstRestricted; const previousAllowAwait = this.context.await; const previousAllowYield = this.context.allowYield; this.context.await = isAsync; this.context.allowYield = !isGenerator; if (!this.match('(')) { const token = this.lookahead; id = (!this.context.strict && !isGenerator && this.matchKeyword('yield')) ? this.parseIdentifierName() : this.parseVariableIdentifier(); if (this.context.strict) { if (this.scanner.isRestrictedWord(token.value as string)) { this.tolerateUnexpectedToken(token, Messages.StrictFunctionName); } } else { if (this.scanner.isRestrictedWord(token.value as string)) { firstRestricted = token; message = Messages.StrictFunctionName; } else if (this.scanner.isStrictModeReservedWord(token.value as string)) { firstRestricted = token; message = Messages.StrictReservedWord; } } } const formalParameters = this.parseFormalParameters(firstRestricted); const params = formalParameters.params; const stricted = formalParameters.stricted; firstRestricted = formalParameters.firstRestricted; if (formalParameters.message) { message = formalParameters.message; } const previousStrict = this.context.strict; const previousAllowStrictDirective = this.context.allowStrictDirective; this.context.allowStrictDirective = formalParameters.simple; const body = this.parseFunctionSourceElements(); if (this.context.strict && firstRestricted) { this.throwUnexpectedToken(firstRestricted, message); } if (this.context.strict && stricted) { this.tolerateUnexpectedToken(stricted, message); } this.context.strict = previousStrict; this.context.allowStrictDirective = previousAllowStrictDirective; this.context.await = previousAllowAwait; this.context.allowYield = previousAllowYield; return isAsync ? this.finalize(node, new Node.AsyncFunctionExpression(id, params, body)) : this.finalize(node, new Node.FunctionExpression(id, params, body, isGenerator)); } // https://tc39.github.io/ecma262/#sec-directive-prologues-and-the-use-strict-directive parseDirective(): Node.Directive | Node.ExpressionStatement { const token = this.lookahead; const node = this.createNode(); const expr = this.parseExpression(); const directive = (expr.type === Syntax.Literal) ? this.getTokenRaw(token).slice(1, -1) : null; this.consumeSemicolon(); return this.finalize(node, directive ? new Node.Directive(expr, directive) : new Node.ExpressionStatement(expr)); } parseDirectivePrologues(): Node.Statement[] { let firstRestricted: RawToken | null = null; const body: Node.Statement[] = []; while (true) { const token = this.lookahead; if (token.type !== Token.StringLiteral) { break; } const statement = this.parseDirective(); body.push(statement); const directive = (statement as Node.Directive).directive; if (typeof directive !== 'string') { break; } if (directive === 'use strict') { this.context.strict = true; if (firstRestricted) { this.tolerateUnexpectedToken(firstRestricted, Messages.StrictOctalLiteral); } if (!this.context.allowStrictDirective) { this.tolerateUnexpectedToken(token, Messages.IllegalLanguageModeDirective); } } else { if (!firstRestricted && token.octal) { firstRestricted = token; } } } return body; } // https://tc39.github.io/ecma262/#sec-method-definitions qualifiedPropertyName(token): boolean { switch (token.type) { case Token.Identifier: case Token.StringLiteral: case Token.BooleanLiteral: case Token.NullLiteral: case Token.NumericLiteral: case Token.Keyword: return true; case Token.Punctuator: return token.value === '['; default: break; } return false; } parseGetterMethod(): Node.FunctionExpression { const node = this.createNode(); const isGenerator = false; const previousAllowYield = this.context.allowYield; this.context.allowYield = !isGenerator; const formalParameters = this.parseFormalParameters(); if (formalParameters.params.length > 0) { this.tolerateError(Messages.BadGetterArity); } const method = this.parsePropertyMethod(formalParameters); this.context.allowYield = previousAllowYield; return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); } parseSetterMethod(): Node.FunctionExpression { const node = this.createNode(); const isGenerator = false; const previousAllowYield = this.context.allowYield; this.context.allowYield = !isGenerator; const formalParameters = this.parseFormalParameters(); if (formalParameters.params.length !== 1) { this.tolerateError(Messages.BadSetterArity); } else if (formalParameters.params[0] instanceof Node.RestElement) { this.tolerateError(Messages.BadSetterRestParameter); } const method = this.parsePropertyMethod(formalParameters); this.context.allowYield = previousAllowYield; return this.finalize(node, new Node.FunctionExpression(null, formalParameters.params, method, isGenerator)); } parseGeneratorMethod(): Node.FunctionExpression { const node = this.createNode(); const isGenerator = true; const previousAllowYield = this.context.allowYield; this.context.allowYield = true; const params = this.parseFormalParameters(); this.context.allowYield = false; const method = this.parsePropertyMethod(params); this.context.allowYield = previousAllowYield; return this.finalize(node, new Node.FunctionExpression(null, params.params, method, isGenerator)); } // https://tc39.github.io/ecma262/#sec-generator-function-definitions isStartOfExpression(): boolean { let start = true; const value = this.lookahead.value; switch (this.lookahead.type) { case Token.Punctuator: start = (value === '[') || (value === '(') || (value === '{') || (value === '+') || (value === '-') || (value === '!') || (value === '~') || (value === '++') || (value === '--') || (value === '/') || (value === '/='); // regular expression literal break; case Token.Keyword: start = (value === 'class') || (value === 'delete') || (value === 'function') || (value === 'let') || (value === 'new') || (value === 'super') || (value === 'this') || (value === 'typeof') || (value === 'void') || (value === 'yield'); break; default: break; } return start; } parseYieldExpression(): Node.YieldExpression { const node = this.createNode(); this.expectKeyword('yield'); let argument: Node.Expression | null = null; let delegate = false; if (!this.hasLineTerminator) { const previousAllowYield = this.context.allowYield; this.context.allowYield = false; delegate = this.match('*'); if (delegate) { this.nextToken(); argument = this.parseAssignmentExpression(); } else if (this.isStartOfExpression()) { argument = this.parseAssignmentExpression(); } this.context.allowYield = previousAllowYield; } return this.finalize(node, new Node.YieldExpression(argument, delegate)); } // https://tc39.github.io/ecma262/#sec-class-definitions parseClassElement(hasConstructor): Node.Property { let token = this.lookahead; const node = this.createNode(); let kind: string = ''; let key: Node.PropertyKey | null = null; let value: Node.FunctionExpression | null = null; let computed = false; let method = false; let isStatic = false; let isAsync = false; if (this.match('*')) { this.nextToken(); } else { computed = this.match('['); key = this.parseObjectPropertyKey(); const id = key as Node.Identifier; if (id.name === 'static' && (this.qualifiedPropertyName(this.lookahead) || this.match('*'))) { token = this.lookahead; isStatic = true; computed = this.match('['); if (this.match('*')) { this.nextToken(); } else { key = this.parseObjectPropertyKey(); } } if ((token.type === Token.Identifier) && !this.hasLineTerminator && (token.value === 'async')) { const punctuator = this.lookahead.value; if (punctuator !== ':' && punctuator !== '(' && punctuator !== '*') { isAsync = true; token = this.lookahead; key = this.parseObjectPropertyKey(); if (token.type === Token.Identifier && token.value === 'constructor') { this.tolerateUnexpectedToken(token, Messages.ConstructorIsAsync); } } } } const lookaheadPropertyKey = this.qualifiedPropertyName(this.lookahead); if (token.type === Token.Identifier) { if (token.value === 'get' && lookaheadPropertyKey) { kind = 'get'; computed = this.match('['); key = this.parseObjectPropertyKey(); this.context.allowYield = false; value = this.parseGetterMethod(); } else if (token.value === 'set' && lookaheadPropertyKey) { kind = 'set'; computed = this.match('['); key = this.parseObjectPropertyKey(); value = this.parseSetterMethod(); } } else if (token.type === Token.Punctuator && token.value === '*' && lookaheadPropertyKey) { kind = 'init'; computed = this.match('['); key = this.parseObjectPropertyKey(); value = this.parseGeneratorMethod(); method = true; } if (!kind && key && this.match('(')) { kind = 'init'; value = isAsync ? this.parsePropertyMethodAsyncFunction() : this.parsePropertyMethodFunction(); method = true; } if (!kind) { this.throwUnexpectedToken(this.lookahead); } if (kind === 'init') { kind = 'method'; } if (!computed) { if (isStatic && this.isPropertyKey(key, 'prototype')) { this.throwUnexpectedToken(token, Messages.StaticPrototype); } if (!isStatic && this.isPropertyKey(key, 'constructor')) { if (kind !== 'method' || !method || (value && value.generator)) { this.throwUnexpectedToken(token, Messages.ConstructorSpecialMethod); } if (hasConstructor.value) { this.throwUnexpectedToken(token, Messages.DuplicateConstructor); } else { hasConstructor.value = true; } kind = 'constructor'; } } return this.finalize(node, new Node.MethodDefinition(key, computed, value, kind, isStatic)); } parseClassElementList(): Node.Property[] { const body: Node.Property[] = []; const hasConstructor = { value: false }; this.expect('{'); while (!this.match('}')) { if (this.match(';')) { this.nextToken(); } else { body.push(this.parseClassElement(hasConstructor)); } } this.expect('}'); return body; } parseClassBody(): Node.ClassBody { const node = this.createNode(); const elementList = this.parseClassElementList(); return this.finalize(node, new Node.ClassBody(elementList)); } parseClassDeclaration(identifierIsOptional?: boolean): Node.ClassDeclaration { const node = this.createNode(); const previousStrict = this.context.strict; this.context.strict = true; this.expectKeyword('class'); const id = (identifierIsOptional && (this.lookahead.type !== Token.Identifier)) ? null : this.parseVariableIdentifier(); let superClass: Node.Identifier | null = null; if (this.matchKeyword('extends')) { this.nextToken(); superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall); } const classBody = this.parseClassBody(); this.context.strict = previousStrict; return this.finalize(node, new Node.ClassDeclaration(id, superClass, classBody)); } parseClassExpression(): Node.ClassExpression { const node = this.createNode(); const previousStrict = this.context.strict; this.context.strict = true; this.expectKeyword('class'); const id = (this.lookahead.type === Token.Identifier) ? this.parseVariableIdentifier() : null; let superClass: Node.Identifier | null = null; if (this.matchKeyword('extends')) { this.nextToken(); superClass = this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall); } const classBody = this.parseClassBody(); this.context.strict = previousStrict; return this.finalize(node, new Node.ClassExpression(id, superClass, classBody)); } // https://tc39.github.io/ecma262/#sec-scripts // https://tc39.github.io/ecma262/#sec-modules parseModule(): Node.Module { this.context.strict = true; this.context.isModule = true; this.scanner.isModule = true; const node = this.createNode(); const body = this.parseDirectivePrologues(); while (this.lookahead.type !== Token.EOF) { body.push(this.parseStatementListItem()); } return this.finalize(node, new Node.Module(body)); } parseScript(): Node.Script { const node = this.createNode(); const body = this.parseDirectivePrologues(); while (this.lookahead.type !== Token.EOF) { body.push(this.parseStatementListItem()); } return this.finalize(node, new Node.Script(body)); } // https://tc39.github.io/ecma262/#sec-imports parseModuleSpecifier(): Node.Literal { const node = this.createNode(); if (this.lookahead.type !== Token.StringLiteral) { this.throwError(Messages.InvalidModuleSpecifier); } const token = this.nextToken(); const raw = this.getTokenRaw(token); return this.finalize(node, new Node.Literal(token.value as string, raw)); } // import {} ...; parseImportSpecifier(): Node.ImportSpecifier { const node = this.createNode(); let imported: Node.Identifier; let local: Node.Identifier; if (this.lookahead.type === Token.Identifier) { imported = this.parseVariableIdentifier(); local = imported; if (this.matchContextualKeyword('as')) { this.nextToken(); local = this.parseVariableIdentifier(); } } else { imported = this.parseIdentifierName(); local = imported; if (this.matchContextualKeyword('as')) { this.nextToken(); local = this.parseVariableIdentifier(); } else { this.throwUnexpectedToken(this.nextToken()); } } return this.finalize(node, new Node.ImportSpecifier(local, imported)); } // {foo, bar as bas} parseNamedImports(): Node.ImportSpecifier[] { this.expect('{'); const specifiers: Node.ImportSpecifier[] = []; while (!this.match('}')) { specifiers.push(this.parseImportSpecifier()); if (!this.match('}')) { this.expect(','); } } this.expect('}'); return specifiers; } // import ...; parseImportDefaultSpecifier(): Node.ImportDefaultSpecifier { const node = this.createNode(); const local = this.parseIdentifierName(); return this.finalize(node, new Node.ImportDefaultSpecifier(local)); } // import <* as foo> ...; parseImportNamespaceSpecifier(): Node.ImportNamespaceSpecifier { const node = this.createNode(); this.expect('*'); if (!this.matchContextualKeyword('as')) { this.throwError(Messages.NoAsAfterImportNamespace); } this.nextToken(); const local = this.parseIdentifierName(); return this.finalize(node, new Node.ImportNamespaceSpecifier(local)); } parseImportDeclaration(): Node.ImportDeclaration { if (this.context.inFunctionBody) { this.throwError(Messages.IllegalImportDeclaration); } const node = this.createNode(); this.expectKeyword('import'); let src: Node.Literal; let specifiers: Node.ImportDeclarationSpecifier[] = []; if (this.lookahead.type === Token.StringLiteral) { // import 'foo'; src = this.parseModuleSpecifier(); } else { if (this.match('{')) { // import {bar} specifiers = specifiers.concat(this.parseNamedImports()); } else if (this.match('*')) { // import * as foo specifiers.push(this.parseImportNamespaceSpecifier()); } else if (this.isIdentifierName(this.lookahead) && !this.matchKeyword('default')) { // import foo specifiers.push(this.parseImportDefaultSpecifier()); if (this.match(',')) { this.nextToken(); if (this.match('*')) { // import foo, * as foo specifiers.push(this.parseImportNamespaceSpecifier()); } else if (this.match('{')) { // import foo, {bar} specifiers = specifiers.concat(this.parseNamedImports()); } else { this.throwUnexpectedToken(this.lookahead); } } } else { this.throwUnexpectedToken(this.nextToken()); } if (!this.matchContextualKeyword('from')) { const message = this.lookahead.value ? Messages.UnexpectedToken : Messages.MissingFromClause; this.throwError(message, this.lookahead.value); } this.nextToken(); src = this.parseModuleSpecifier(); } this.consumeSemicolon(); return this.finalize(node, new Node.ImportDeclaration(specifiers, src)); } // https://tc39.github.io/ecma262/#sec-exports parseExportSpecifier(): Node.ExportSpecifier { const node = this.createNode(); const local = this.parseIdentifierName(); let exported = local; if (this.matchContextualKeyword('as')) { this.nextToken(); exported = this.parseIdentifierName(); } return this.finalize(node, new Node.ExportSpecifier(local, exported)); } parseExportDeclaration(): Node.ExportDeclaration { if (this.context.inFunctionBody) { this.throwError(Messages.IllegalExportDeclaration); } const node = this.createNode(); this.expectKeyword('export'); let exportDeclaration; if (this.matchKeyword('default')) { // export default ... this.nextToken(); if (this.matchKeyword('function')) { // export default function foo () {} // export default function () {} const declaration = this.parseFunctionDeclaration(true); exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); } else if (this.matchKeyword('class')) { // export default class foo {} const declaration = this.parseClassDeclaration(true); exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); } else if (this.matchContextualKeyword('async')) { // export default async function f () {} // export default async function () {} // export default async x => x const declaration = this.matchAsyncFunction() ? this.parseFunctionDeclaration(true) : this.parseAssignmentExpression(); exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); } else { if (this.matchContextualKeyword('from')) { this.throwError(Messages.UnexpectedToken, this.lookahead.value); } // export default {}; // export default []; // export default (1 + 2); const declaration = this.match('{') ? this.parseObjectInitializer() : this.match('[') ? this.parseArrayInitializer() : this.parseAssignmentExpression(); this.consumeSemicolon(); exportDeclaration = this.finalize(node, new Node.ExportDefaultDeclaration(declaration)); } } else if (this.match('*')) { // export * from 'foo'; this.nextToken(); if (!this.matchContextualKeyword('from')) { const message = this.lookahead.value ? Messages.UnexpectedToken : Messages.MissingFromClause; this.throwError(message, this.lookahead.value); } this.nextToken(); const src = this.parseModuleSpecifier(); this.consumeSemicolon(); exportDeclaration = this.finalize(node, new Node.ExportAllDeclaration(src)); } else if (this.lookahead.type === Token.Keyword) { // export var f = 1; let declaration; switch (this.lookahead.value) { case 'let': case 'const': declaration = this.parseLexicalDeclaration({ inFor: false }); break; case 'var': case 'class': case 'function': declaration = this.parseStatementListItem(); break; default: this.throwUnexpectedToken(this.lookahead); } exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null)); } else if (this.matchAsyncFunction()) { const declaration = this.parseFunctionDeclaration(); exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(declaration, [], null)); } else { const specifiers: Node.ExportSpecifier[] = []; let source: Node.Literal | null = null; let isExportFromIdentifier = false; this.expect('{'); while (!this.match('}')) { isExportFromIdentifier = isExportFromIdentifier || this.matchKeyword('default'); specifiers.push(this.parseExportSpecifier()); if (!this.match('}')) { this.expect(','); } } this.expect('}'); if (this.matchContextualKeyword('from')) { // export {default} from 'foo'; // export {foo} from 'foo'; this.nextToken(); source = this.parseModuleSpecifier(); this.consumeSemicolon(); } else if (isExportFromIdentifier) { // export {default}; // missing fromClause const message = this.lookahead.value ? Messages.UnexpectedToken : Messages.MissingFromClause; this.throwError(message, this.lookahead.value); } else { // export {foo}; this.consumeSemicolon(); } exportDeclaration = this.finalize(node, new Node.ExportNamedDeclaration(null, specifiers, source)); } return exportDeclaration; } } esprima-4.0.1/src/scanner.ts000066400000000000000000001237071331122015500157470ustar00rootroot00000000000000import { assert } from './assert'; import { Character } from './character'; import { ErrorHandler } from './error-handler'; import { Messages } from './messages'; import { Token } from './token'; function hexValue(ch: string): number { return '0123456789abcdef'.indexOf(ch.toLowerCase()); } function octalValue(ch: string): number { return '01234567'.indexOf(ch); } export interface Position { line: number; column: number; } export interface SourceLocation { start: Position; end: Position; source?: string; } export interface Comment { multiLine: boolean; slice: number[]; range: [number, number]; loc: SourceLocation; } export interface RawToken { type: Token; value: string | number; pattern?: string; flags?: string; regex?: RegExp | null; octal?: boolean; cooked?: string; head?: boolean; tail?: boolean; lineNumber: number; lineStart: number; start: number; end: number; } interface ScannerState { index: number; lineNumber: number; lineStart: number; } export class Scanner { readonly source: string; readonly errorHandler: ErrorHandler; trackComment: boolean; isModule: boolean; index: number; lineNumber: number; lineStart: number; private curlyStack: string[]; private readonly length: number; constructor(code: string, handler: ErrorHandler) { this.source = code; this.errorHandler = handler; this.trackComment = false; this.isModule = false; this.length = code.length; this.index = 0; this.lineNumber = (code.length > 0) ? 1 : 0; this.lineStart = 0; this.curlyStack = []; } public saveState(): ScannerState { return { index: this.index, lineNumber: this.lineNumber, lineStart: this.lineStart }; } public restoreState(state: ScannerState): void { this.index = state.index; this.lineNumber = state.lineNumber; this.lineStart = state.lineStart; } public eof(): boolean { return this.index >= this.length; } public throwUnexpectedToken(message = Messages.UnexpectedTokenIllegal): never { return this.errorHandler.throwError(this.index, this.lineNumber, this.index - this.lineStart + 1, message); } private tolerateUnexpectedToken(message = Messages.UnexpectedTokenIllegal) { this.errorHandler.tolerateError(this.index, this.lineNumber, this.index - this.lineStart + 1, message); } // https://tc39.github.io/ecma262/#sec-comments private skipSingleLineComment(offset: number): Comment[] { let comments: Comment[] = []; let start, loc; if (this.trackComment) { comments = []; start = this.index - offset; loc = { start: { line: this.lineNumber, column: this.index - this.lineStart - offset }, end: {} }; } while (!this.eof()) { const ch = this.source.charCodeAt(this.index); ++this.index; if (Character.isLineTerminator(ch)) { if (this.trackComment) { loc.end = { line: this.lineNumber, column: this.index - this.lineStart - 1 }; const entry: Comment = { multiLine: false, slice: [start + offset, this.index - 1], range: [start, this.index - 1], loc: loc }; comments.push(entry); } if (ch === 13 && this.source.charCodeAt(this.index) === 10) { ++this.index; } ++this.lineNumber; this.lineStart = this.index; return comments; } } if (this.trackComment) { loc.end = { line: this.lineNumber, column: this.index - this.lineStart }; const entry: Comment = { multiLine: false, slice: [start + offset, this.index], range: [start, this.index], loc: loc }; comments.push(entry); } return comments; } private skipMultiLineComment(): Comment[] { let comments: Comment[] = []; let start, loc; if (this.trackComment) { comments = []; start = this.index - 2; loc = { start: { line: this.lineNumber, column: this.index - this.lineStart - 2 }, end: {} }; } while (!this.eof()) { const ch = this.source.charCodeAt(this.index); if (Character.isLineTerminator(ch)) { if (ch === 0x0D && this.source.charCodeAt(this.index + 1) === 0x0A) { ++this.index; } ++this.lineNumber; ++this.index; this.lineStart = this.index; } else if (ch === 0x2A) { // Block comment ends with '*/'. if (this.source.charCodeAt(this.index + 1) === 0x2F) { this.index += 2; if (this.trackComment) { loc.end = { line: this.lineNumber, column: this.index - this.lineStart }; const entry: Comment = { multiLine: true, slice: [start + 2, this.index - 2], range: [start, this.index], loc: loc }; comments.push(entry); } return comments; } ++this.index; } else { ++this.index; } } // Ran off the end of the file - the whole thing is a comment if (this.trackComment) { loc.end = { line: this.lineNumber, column: this.index - this.lineStart }; const entry: Comment = { multiLine: true, slice: [start + 2, this.index], range: [start, this.index], loc: loc }; comments.push(entry); } this.tolerateUnexpectedToken(); return comments; } public scanComments() { let comments; if (this.trackComment) { comments = []; } let start = (this.index === 0); while (!this.eof()) { let ch = this.source.charCodeAt(this.index); if (Character.isWhiteSpace(ch)) { ++this.index; } else if (Character.isLineTerminator(ch)) { ++this.index; if (ch === 0x0D && this.source.charCodeAt(this.index) === 0x0A) { ++this.index; } ++this.lineNumber; this.lineStart = this.index; start = true; } else if (ch === 0x2F) { // U+002F is '/' ch = this.source.charCodeAt(this.index + 1); if (ch === 0x2F) { this.index += 2; const comment = this.skipSingleLineComment(2); if (this.trackComment) { comments = comments.concat(comment); } start = true; } else if (ch === 0x2A) { // U+002A is '*' this.index += 2; const comment = this.skipMultiLineComment(); if (this.trackComment) { comments = comments.concat(comment); } } else { break; } } else if (start && ch === 0x2D) { // U+002D is '-' // U+003E is '>' if ((this.source.charCodeAt(this.index + 1) === 0x2D) && (this.source.charCodeAt(this.index + 2) === 0x3E)) { // '-->' is a single-line comment this.index += 3; const comment = this.skipSingleLineComment(3); if (this.trackComment) { comments = comments.concat(comment); } } else { break; } } else if (ch === 0x3C && !this.isModule) { // U+003C is '<' if (this.source.slice(this.index + 1, this.index + 4) === '!--') { this.index += 4; // ` commentesprima-4.0.1/test/fixtures/comment/migrated_0038.tree.json000066400000000000000000000013431331122015500235370ustar00rootroot00000000000000{ "type": "Program", "body": [], "sourceType": "script", "comments": [ { "type": "Line", "value": " comment", "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "tokens": [], "range": [ 11, 11 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/comment/migrated_0039.js000066400000000000000000000000141331122015500222370ustar00rootroot00000000000000 commentesprima-4.0.1/test/fixtures/comment/migrated_0040.tree.json000066400000000000000000000013431331122015500235300ustar00rootroot00000000000000{ "type": "Program", "body": [], "sourceType": "script", "comments": [ { "type": "Line", "value": " comment", "range": [ 3, 14 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 14 } } } ], "tokens": [], "range": [ 14, 14 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 14 } } } esprima-4.0.1/test/fixtures/comment/migrated_0041.js000066400000000000000000000000431331122015500222320ustar00rootroot00000000000000 /* block comment */ --> commentesprima-4.0.1/test/fixtures/comment/migrated_0041.tree.json000066400000000000000000000022061331122015500235300ustar00rootroot00000000000000{ "type": "Program", "body": [], "sourceType": "script", "comments": [ { "type": "Block", "value": " block comment ", "range": [ 3, 22 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 22 } } }, { "type": "Line", "value": " comment", "range": [ 24, 35 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 35 } } } ], "tokens": [], "range": [ 35, 35 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 35 } } } esprima-4.0.1/test/fixtures/comment/migrated_0042.js000066400000000000000000000000361331122015500222350ustar00rootroot00000000000000/* block comment */--> commentesprima-4.0.1/test/fixtures/comment/migrated_0042.tree.json000066400000000000000000000022061331122015500235310ustar00rootroot00000000000000{ "type": "Program", "body": [], "sourceType": "script", "comments": [ { "type": "Block", "value": " block comment ", "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } }, { "type": "Line", "value": " comment", "range": [ 19, 30 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 30 } } } ], "tokens": [], "range": [ 30, 30 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 30 } } } esprima-4.0.1/test/fixtures/comment/migrated_0043.js000066400000000000000000000000271331122015500222360ustar00rootroot00000000000000/* not comment*/; i-->0esprima-4.0.1/test/fixtures/comment/migrated_0043.tree.json000066400000000000000000000125541331122015500235410ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "EmptyStatement", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": ">", "left": { "type": "UpdateExpression", "operator": "--", "argument": { "type": "Identifier", "name": "i", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, "prefix": false, "range": [ 18, 21 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 21 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "range": [ 18, 23 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 23 } } }, "range": [ 18, 23 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": ";", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "i", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "--", "range": [ 19, 21 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ">", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Numeric", "value": "0", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ], "range": [ 16, 23 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 23 } } } esprima-4.0.1/test/fixtures/comment/migrated_0044.js000066400000000000000000000000201331122015500222300ustar00rootroot00000000000000while (i-->0) {}esprima-4.0.1/test/fixtures/comment/migrated_0044.tree.json000066400000000000000000000160301331122015500235330ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "WhileStatement", "test": { "type": "BinaryExpression", "operator": ">", "left": { "type": "UpdateExpression", "operator": "--", "argument": { "type": "Identifier", "name": "i", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, "prefix": false, "range": [ 7, 10 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 10 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, "range": [ 7, 12 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } } }, "body": { "type": "BlockStatement", "body": [], "range": [ 14, 16 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 16 } } }, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "while", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "i", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "--", "range": [ 8, 10 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ">", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Numeric", "value": "0", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ")", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "{", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "}", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/comment/migrated_0045.js000066400000000000000000000000331331122015500222350ustar00rootroot00000000000000/*Venus*/ debugger; // Marsesprima-4.0.1/test/fixtures/comment/migrated_0045.tree.json000066400000000000000000000067521331122015500235460ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "DebuggerStatement", "leadingComments": [ { "type": "Block", "value": "Venus", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "trailingComments": [ { "type": "Line", "value": " Mars", "range": [ 20, 27 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 27 } } } ], "range": [ 10, 19 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 19 } } } ], "sourceType": "script", "comments": [ { "type": "Block", "value": "Venus", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, { "type": "Line", "value": " Mars", "range": [ 20, 27 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 27 } } } ], "tokens": [ { "type": "Keyword", "value": "debugger", "range": [ 10, 18 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ";", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } } ], "range": [ 10, 19 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 19 } } } esprima-4.0.1/test/fixtures/comment/migrated_0046.js000066400000000000000000000000551331122015500222420ustar00rootroot00000000000000function x(){ /*Jupiter*/ return; /*Saturn*/}esprima-4.0.1/test/fixtures/comment/migrated_0046.tree.json000066400000000000000000000131421331122015500235360ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "x", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": null, "range": [ 26, 33 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 33 } } } ], "range": [ 12, 45 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 45 } } }, "generator": false, "expression": false, "async": false, "range": [ 0, 45 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 45 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "x", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "return", "range": [ 26, 32 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": ";", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "}", "range": [ 44, 45 ], "loc": { "start": { "line": 1, "column": 44 }, "end": { "line": 1, "column": 45 } } } ], "range": [ 0, 45 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 45 } } } esprima-4.0.1/test/fixtures/comment/migrated_0047.js000066400000000000000000000000401331122015500222350ustar00rootroot00000000000000(/* comment */{ p1: null }) esprima-4.0.1/test/fixtures/comment/migrated_0047.tree.json000066400000000000000000000060401331122015500235360ustar00rootroot00000000000000{ "type": "Program", "body": [ { "range": [ 0, 31 ], "type": "ExpressionStatement", "expression": { "range": [ 14, 30 ], "type": "ObjectExpression", "properties": [ { "range": [ 20, 28 ], "type": "Property", "key": { "range": [ 20, 22 ], "type": "Identifier", "name": "p1" }, "computed": false, "value": { "range": [ 24, 28 ], "type": "Literal", "value": null, "raw": "null" }, "kind": "init", "method": false, "shorthand": false } ], "leadingComments": [ { "type": "Block", "value": " comment ", "range": [ 1, 14 ] } ] } } ], "sourceType": "script", "comments": [ { "type": "Block", "value": " comment ", "range": [ 1, 14 ] } ], "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ] }, { "type": "Punctuator", "value": "{", "range": [ 14, 15 ] }, { "type": "Identifier", "value": "p1", "range": [ 20, 22 ] }, { "type": "Punctuator", "value": ":", "range": [ 22, 23 ] }, { "type": "Null", "value": "null", "range": [ 24, 28 ] }, { "type": "Punctuator", "value": "}", "range": [ 29, 30 ] }, { "type": "Punctuator", "value": ")", "range": [ 30, 31 ] } ], "range": [ 0, 31 ] } esprima-4.0.1/test/fixtures/comment/migrated_0048.js000066400000000000000000000000561331122015500222450ustar00rootroot00000000000000(/* comment */{ p1: null, p2: null }) esprima-4.0.1/test/fixtures/comment/migrated_0048.tree.json000066400000000000000000000112021331122015500235330ustar00rootroot00000000000000{ "type": "Program", "body": [ { "range": [ 0, 45 ], "type": "ExpressionStatement", "expression": { "range": [ 14, 44 ], "type": "ObjectExpression", "properties": [ { "range": [ 20, 28 ], "type": "Property", "key": { "range": [ 20, 22 ], "type": "Identifier", "name": "p1" }, "computed": false, "value": { "range": [ 24, 28 ], "type": "Literal", "value": null, "raw": "null" }, "kind": "init", "method": false, "shorthand": false }, { "range": [ 34, 42 ], "type": "Property", "key": { "range": [ 34, 36 ], "type": "Identifier", "name": "p2" }, "computed": false, "value": { "range": [ 38, 42 ], "type": "Literal", "value": null, "raw": "null" }, "kind": "init", "method": false, "shorthand": false } ], "leadingComments": [ { "type": "Block", "value": " comment ", "range": [ 1, 14 ] } ] } } ], "sourceType": "script", "comments": [ { "type": "Block", "value": " comment ", "range": [ 1, 14 ] } ], "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ] }, { "type": "Punctuator", "value": "{", "range": [ 14, 15 ] }, { "type": "Identifier", "value": "p1", "range": [ 20, 22 ] }, { "type": "Punctuator", "value": ":", "range": [ 22, 23 ] }, { "type": "Null", "value": "null", "range": [ 24, 28 ] }, { "type": "Punctuator", "value": ",", "range": [ 28, 29 ] }, { "type": "Identifier", "value": "p2", "range": [ 34, 36 ] }, { "type": "Punctuator", "value": ":", "range": [ 36, 37 ] }, { "type": "Null", "value": "null", "range": [ 38, 42 ] }, { "type": "Punctuator", "value": "}", "range": [ 43, 44 ] }, { "type": "Punctuator", "value": ")", "range": [ 44, 45 ] } ], "range": [ 0, 45 ] } esprima-4.0.1/test/fixtures/comment/migrated_0049.js000066400000000000000000000000451331122015500222440ustar00rootroot00000000000000/** * @type {number} */ var a = 5; esprima-4.0.1/test/fixtures/comment/migrated_0049.tree.json000066400000000000000000000044671331122015500235530ustar00rootroot00000000000000{ "type": "Program", "body": [ { "range": [ 26, 36 ], "type": "VariableDeclaration", "declarations": [ { "range": [ 30, 35 ], "type": "VariableDeclarator", "id": { "range": [ 30, 31 ], "type": "Identifier", "name": "a" }, "init": { "range": [ 34, 35 ], "type": "Literal", "value": 5, "raw": "5" } } ], "kind": "var", "leadingComments": [ { "type": "Block", "value": "*\n * @type {number}\n ", "range": [ 0, 25 ] } ] } ], "sourceType": "script", "comments": [ { "type": "Block", "value": "*\n * @type {number}\n ", "range": [ 0, 25 ] } ], "tokens": [ { "type": "Keyword", "value": "var", "range": [ 26, 29 ] }, { "type": "Identifier", "value": "a", "range": [ 30, 31 ] }, { "type": "Punctuator", "value": "=", "range": [ 32, 33 ] }, { "type": "Numeric", "value": "5", "range": [ 34, 35 ] }, { "type": "Punctuator", "value": ";", "range": [ 35, 36 ] } ], "range": [ 26, 36 ] } esprima-4.0.1/test/fixtures/comment/migrated_0050.js000066400000000000000000000001261331122015500222340ustar00rootroot00000000000000/** * @type {number} */ var a = 5, /** * @type {number} */ b = 6; esprima-4.0.1/test/fixtures/comment/migrated_0050.tree.json000066400000000000000000000102741331122015500235340ustar00rootroot00000000000000{ "type": "Program", "body": [ { "range": [ 26, 85 ], "type": "VariableDeclaration", "declarations": [ { "range": [ 30, 35 ], "type": "VariableDeclarator", "id": { "range": [ 30, 31 ], "type": "Identifier", "name": "a" }, "init": { "range": [ 34, 35 ], "type": "Literal", "value": 5, "raw": "5" } }, { "range": [ 79, 84 ], "type": "VariableDeclarator", "id": { "range": [ 79, 80 ], "type": "Identifier", "name": "b" }, "init": { "range": [ 83, 84 ], "type": "Literal", "value": 6, "raw": "6" }, "leadingComments": [ { "type": "Block", "value": "*\n * @type {number}\n ", "range": [ 41, 74 ] } ] } ], "kind": "var", "leadingComments": [ { "type": "Block", "value": "*\n * @type {number}\n ", "range": [ 0, 25 ] } ] } ], "sourceType": "script", "comments": [ { "type": "Block", "value": "*\n * @type {number}\n ", "range": [ 0, 25 ] }, { "type": "Block", "value": "*\n * @type {number}\n ", "range": [ 41, 74 ] } ], "tokens": [ { "type": "Keyword", "value": "var", "range": [ 26, 29 ] }, { "type": "Identifier", "value": "a", "range": [ 30, 31 ] }, { "type": "Punctuator", "value": "=", "range": [ 32, 33 ] }, { "type": "Numeric", "value": "5", "range": [ 34, 35 ] }, { "type": "Punctuator", "value": ",", "range": [ 35, 36 ] }, { "type": "Identifier", "value": "b", "range": [ 79, 80 ] }, { "type": "Punctuator", "value": "=", "range": [ 81, 82 ] }, { "type": "Numeric", "value": "6", "range": [ 83, 84 ] }, { "type": "Punctuator", "value": ";", "range": [ 84, 85 ] } ], "range": [ 26, 85 ] } esprima-4.0.1/test/fixtures/comment/migrated_0051.js000066400000000000000000000000641331122015500222360ustar00rootroot00000000000000(/* comment */{ /* comment 2 */ p1: null }) esprima-4.0.1/test/fixtures/comment/migrated_0051.tree.json000066400000000000000000000071131331122015500235330ustar00rootroot00000000000000{ "type": "Program", "body": [ { "range": [ 0, 51 ], "type": "ExpressionStatement", "expression": { "range": [ 14, 50 ], "type": "ObjectExpression", "properties": [ { "range": [ 40, 48 ], "type": "Property", "key": { "range": [ 40, 42 ], "type": "Identifier", "name": "p1" }, "computed": false, "value": { "range": [ 44, 48 ], "type": "Literal", "value": null, "raw": "null" }, "kind": "init", "method": false, "shorthand": false, "leadingComments": [ { "type": "Block", "value": " comment 2 ", "range": [ 20, 35 ] } ] } ], "leadingComments": [ { "type": "Block", "value": " comment ", "range": [ 1, 14 ] } ] } } ], "sourceType": "script", "comments": [ { "type": "Block", "value": " comment ", "range": [ 1, 14 ] }, { "type": "Block", "value": " comment 2 ", "range": [ 20, 35 ] } ], "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ] }, { "type": "Punctuator", "value": "{", "range": [ 14, 15 ] }, { "type": "Identifier", "value": "p1", "range": [ 40, 42 ] }, { "type": "Punctuator", "value": ":", "range": [ 42, 43 ] }, { "type": "Null", "value": "null", "range": [ 44, 48 ] }, { "type": "Punctuator", "value": "}", "range": [ 49, 50 ] }, { "type": "Punctuator", "value": ")", "range": [ 50, 51 ] } ], "range": [ 0, 51 ] } esprima-4.0.1/test/fixtures/comment/migrated_0052.js000066400000000000000000000000251331122015500222340ustar00rootroot00000000000000/**/ function a() {} esprima-4.0.1/test/fixtures/comment/migrated_0052.tree.json000066400000000000000000000041711331122015500235350ustar00rootroot00000000000000{ "type": "Program", "body": [ { "range": [ 5, 20 ], "type": "FunctionDeclaration", "id": { "range": [ 14, 15 ], "type": "Identifier", "name": "a" }, "params": [], "body": { "range": [ 18, 20 ], "type": "BlockStatement", "body": [] }, "generator": false, "expression": false, "async": false, "leadingComments": [ { "type": "Block", "value": "", "range": [ 0, 4 ] } ] } ], "sourceType": "script", "comments": [ { "type": "Block", "value": "", "range": [ 0, 4 ] } ], "tokens": [ { "type": "Keyword", "value": "function", "range": [ 5, 13 ] }, { "type": "Identifier", "value": "a", "range": [ 14, 15 ] }, { "type": "Punctuator", "value": "(", "range": [ 15, 16 ] }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ] }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ] }, { "type": "Punctuator", "value": "}", "range": [ 19, 20 ] } ], "range": [ 5, 20 ] } esprima-4.0.1/test/fixtures/comment/migrated_0053.js000066400000000000000000000000441331122015500222360ustar00rootroot00000000000000/**/ function a() {function o() {}} esprima-4.0.1/test/fixtures/comment/migrated_0053.tree.json000066400000000000000000000100131331122015500235260ustar00rootroot00000000000000{ "type": "Program", "body": [ { "range": [ 5, 35 ], "type": "FunctionDeclaration", "id": { "range": [ 14, 15 ], "type": "Identifier", "name": "a" }, "params": [], "body": { "range": [ 18, 35 ], "type": "BlockStatement", "body": [ { "range": [ 19, 34 ], "type": "FunctionDeclaration", "id": { "range": [ 28, 29 ], "type": "Identifier", "name": "o" }, "params": [], "body": { "range": [ 32, 34 ], "type": "BlockStatement", "body": [] }, "generator": false, "expression": false, "async": false } ] }, "generator": false, "expression": false, "async": false, "leadingComments": [ { "type": "Block", "value": "", "range": [ 0, 4 ] } ] } ], "sourceType": "script", "comments": [ { "type": "Block", "value": "", "range": [ 0, 4 ] } ], "tokens": [ { "type": "Keyword", "value": "function", "range": [ 5, 13 ] }, { "type": "Identifier", "value": "a", "range": [ 14, 15 ] }, { "type": "Punctuator", "value": "(", "range": [ 15, 16 ] }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ] }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ] }, { "type": "Keyword", "value": "function", "range": [ 19, 27 ] }, { "type": "Identifier", "value": "o", "range": [ 28, 29 ] }, { "type": "Punctuator", "value": "(", "range": [ 29, 30 ] }, { "type": "Punctuator", "value": ")", "range": [ 30, 31 ] }, { "type": "Punctuator", "value": "{", "range": [ 32, 33 ] }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ] }, { "type": "Punctuator", "value": "}", "range": [ 34, 35 ] } ], "range": [ 5, 35 ] } esprima-4.0.1/test/fixtures/comment/migrated_0054.js000066400000000000000000000000501331122015500222340ustar00rootroot00000000000000/**/ function a() {/**/function o() {}} esprima-4.0.1/test/fixtures/comment/migrated_0054.tree.json000066400000000000000000000110401331122015500235300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "range": [ 5, 39 ], "type": "FunctionDeclaration", "id": { "range": [ 14, 15 ], "type": "Identifier", "name": "a" }, "params": [], "body": { "range": [ 18, 39 ], "type": "BlockStatement", "body": [ { "range": [ 23, 38 ], "type": "FunctionDeclaration", "id": { "range": [ 32, 33 ], "type": "Identifier", "name": "o" }, "params": [], "body": { "range": [ 36, 38 ], "type": "BlockStatement", "body": [] }, "generator": false, "expression": false, "async": false, "leadingComments": [ { "type": "Block", "value": "", "range": [ 19, 23 ] } ] } ] }, "generator": false, "expression": false, "async": false, "leadingComments": [ { "type": "Block", "value": "", "range": [ 0, 4 ] } ] } ], "sourceType": "script", "comments": [ { "type": "Block", "value": "", "range": [ 0, 4 ] }, { "type": "Block", "value": "", "range": [ 19, 23 ] } ], "tokens": [ { "type": "Keyword", "value": "function", "range": [ 5, 13 ] }, { "type": "Identifier", "value": "a", "range": [ 14, 15 ] }, { "type": "Punctuator", "value": "(", "range": [ 15, 16 ] }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ] }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ] }, { "type": "Keyword", "value": "function", "range": [ 23, 31 ] }, { "type": "Identifier", "value": "o", "range": [ 32, 33 ] }, { "type": "Punctuator", "value": "(", "range": [ 33, 34 ] }, { "type": "Punctuator", "value": ")", "range": [ 34, 35 ] }, { "type": "Punctuator", "value": "{", "range": [ 36, 37 ] }, { "type": "Punctuator", "value": "}", "range": [ 37, 38 ] }, { "type": "Punctuator", "value": "}", "range": [ 38, 39 ] } ], "range": [ 5, 39 ] } esprima-4.0.1/test/fixtures/comment/migrated_0055.js000066400000000000000000000000721331122015500222410ustar00rootroot00000000000000while (true) { /** * comments in empty block */ } esprima-4.0.1/test/fixtures/comment/migrated_0055.tree.json000066400000000000000000000123121331122015500235340ustar00rootroot00000000000000{ "range": [ 0, 57 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 5, "column": 1 } }, "type": "Program", "body": [ { "range": [ 0, 57 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 5, "column": 1 } }, "type": "WhileStatement", "test": { "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } }, "type": "Literal", "value": true, "raw": "true" }, "body": { "range": [ 13, 57 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 5, "column": 1 } }, "type": "BlockStatement", "body": [], "innerComments": [ { "type": "Block", "value": "*\n * comments in empty block\n ", "range": [ 17, 55 ], "loc": { "start": { "line": 2, "column": 2 }, "end": { "line": 4, "column": 5 } } } ] } } ], "sourceType": "script", "comments": [ { "type": "Block", "value": "*\n * comments in empty block\n ", "range": [ 17, 55 ], "loc": { "start": { "line": 2, "column": 2 }, "end": { "line": 4, "column": 5 } } } ], "tokens": [ { "type": "Keyword", "value": "while", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Boolean", "value": "true", "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "}", "range": [ 56, 57 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 1 } } } ] } esprima-4.0.1/test/fixtures/declaration/000077500000000000000000000000001331122015500202625ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/declaration/const/000077500000000000000000000000001331122015500214105ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/declaration/const/migrated_0000.js000066400000000000000000000000141331122015500241740ustar00rootroot00000000000000const x = 42esprima-4.0.1/test/fixtures/declaration/const/migrated_0000.tree.json000066400000000000000000000101771331122015500255020ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "init": { "type": "Literal", "value": 42, "raw": "42", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, "range": [ 6, 12 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 12 } } } ], "kind": "const", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "const", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "=", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Numeric", "value": "42", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } } ], "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } } esprima-4.0.1/test/fixtures/declaration/const/migrated_0001.js000066400000000000000000000000201331122015500241720ustar00rootroot00000000000000{ const x = 42 }esprima-4.0.1/test/fixtures/declaration/const/migrated_0001.tree.json000066400000000000000000000136511331122015500255030ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "init": { "type": "Literal", "value": 42, "raw": "42", "range": [ 12, 14 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 14 } } }, "range": [ 8, 14 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 14 } } } ], "kind": "const", "range": [ 2, 15 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "{", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "const", "range": [ 2, 7 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "=", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Numeric", "value": "42", "range": [ 12, 14 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "}", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/declaration/const/migrated_0002.js000066400000000000000000000000411331122015500241760ustar00rootroot00000000000000{ const x = 14, y = 3, z = 1977 }esprima-4.0.1/test/fixtures/declaration/const/migrated_0002.tree.json000066400000000000000000000330341331122015500255010ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "init": { "type": "Literal", "value": 14, "raw": "14", "range": [ 12, 14 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 14 } } }, "range": [ 8, 14 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 14 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "y", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "init": { "type": "Literal", "value": 3, "raw": "3", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, "range": [ 16, 21 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 21 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "z", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, "init": { "type": "Literal", "value": 1977, "raw": "1977", "range": [ 27, 31 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 31 } } }, "range": [ 23, 31 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 31 } } } ], "kind": "const", "range": [ 2, 32 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 32 } } } ], "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "{", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "const", "range": [ 2, 7 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "=", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Numeric", "value": "14", "range": [ 12, 14 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ",", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "y", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "=", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Numeric", "value": "3", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ",", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "z", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "=", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Numeric", "value": "1977", "range": [ 27, 31 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "}", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } } ], "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } } } esprima-4.0.1/test/fixtures/declaration/function/000077500000000000000000000000001331122015500221075ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/declaration/function/dupe-param.js000066400000000000000000000000411331122015500244730ustar00rootroot00000000000000function a(x, x) {'use strict';} esprima-4.0.1/test/fixtures/declaration/function/dupe-param.tree.json000066400000000000000000000216001331122015500257720ustar00rootroot00000000000000{ "type": "Program", "body": [ { "range": [ 0, 32 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 32 } }, "type": "FunctionDeclaration", "id": { "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } }, "type": "Identifier", "name": "a" }, "params": [ { "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } }, "type": "Identifier", "name": "x" }, { "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } }, "type": "Identifier", "name": "x" } ], "body": { "range": [ 17, 32 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 32 } }, "type": "BlockStatement", "body": [ { "range": [ 18, 31 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 31 } }, "type": "ExpressionStatement", "expression": { "range": [ 18, 30 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 30 } }, "type": "Literal", "value": "use strict", "raw": "'use strict'" }, "directive": "use strict" } ] }, "generator": false, "expression": false, "async": false } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "a", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "x", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ",", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "x", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "{", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "String", "value": "'use strict'", "range": [ 18, 30 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": ";", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "}", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } } ], "errors": [ { "index": 14, "lineNumber": 1, "column": 15, "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" } ], "range": [ 0, 32 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 32 } } } esprima-4.0.1/test/fixtures/declaration/function/invalid-strict-labelled-function-declaration.js000066400000000000000000000000401331122015500332430ustar00rootroot00000000000000"use strict"; a: function f(){} invalid-strict-labelled-function-declaration.tree.json000066400000000000000000000200661331122015500344710ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/declaration/function{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "LabeledStatement", "label": { "type": "Identifier", "name": "a", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, "body": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 29, 31 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 31 } } }, "generator": false, "expression": false, "async": false, "range": [ 17, 31 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 31 } } }, "range": [ 14, 31 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 31 } } } ], "sourceType": "script", "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } }, "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "a", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ":", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Keyword", "value": "function", "range": [ 17, 25 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 25 } } }, { "type": "Identifier", "value": "f", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "(", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": ")", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "{", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": "}", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } } ], "errors": [ { "index": 17, "lineNumber": 1, "column": 18, "message": "Error: Line 1: In strict mode code, functions can only be declared at top level or inside a block" } ] }esprima-4.0.1/test/fixtures/declaration/function/migrated_0000.js000066400000000000000000000000351331122015500246760ustar00rootroot00000000000000function hello() { sayHi(); }esprima-4.0.1/test/fixtures/declaration/function/migrated_0000.tree.json000066400000000000000000000175301331122015500262010ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "hello", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "sayHi", "range": [ 19, 24 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 24 } } }, "arguments": [], "range": [ 19, 26 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 26 } } }, "range": [ 19, 27 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 27 } } } ], "range": [ 17, 29 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 29 } } }, "generator": false, "expression": false, "async": false, "range": [ 0, 29 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 29 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "hello", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "{", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "sayHi", "range": [ 19, 24 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "(", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ")", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": ";", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "}", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } } ], "range": [ 0, 29 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 29 } } } esprima-4.0.1/test/fixtures/declaration/function/migrated_0001.js000066400000000000000000000000231331122015500246740ustar00rootroot00000000000000function eval() { }esprima-4.0.1/test/fixtures/declaration/function/migrated_0001.tree.json000066400000000000000000000102471331122015500262000ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "eval", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 16, 19 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 19 } } }, "generator": false, "expression": false, "async": false, "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "eval", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ")", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "{", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "}", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } } ], "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } } esprima-4.0.1/test/fixtures/declaration/function/migrated_0002.js000066400000000000000000000000301331122015500246730ustar00rootroot00000000000000function arguments() { }esprima-4.0.1/test/fixtures/declaration/function/migrated_0002.tree.json000066400000000000000000000102611331122015500261750ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "arguments", "range": [ 9, 18 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 21, 24 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 24 } } }, "generator": false, "expression": false, "async": false, "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "arguments", "range": [ 9, 18 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "(", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ")", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "{", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "}", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } esprima-4.0.1/test/fixtures/declaration/function/migrated_0003.js000066400000000000000000000000271331122015500247020ustar00rootroot00000000000000function test(t, t) { }esprima-4.0.1/test/fixtures/declaration/function/migrated_0003.tree.json000066400000000000000000000147231331122015500262050ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "test", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, "params": [ { "type": "Identifier", "name": "t", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "name": "t", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 20, 23 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 23 } } }, "generator": false, "expression": false, "async": false, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "test", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "t", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ",", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "t", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "{", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "}", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ], "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } esprima-4.0.1/test/fixtures/declaration/function/migrated_0004.js000066400000000000000000000000311331122015500246760ustar00rootroot00000000000000(function test(t, t) { })esprima-4.0.1/test/fixtures/declaration/function/migrated_0004.tree.json000066400000000000000000000200231331122015500261740ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "FunctionExpression", "id": { "type": "Identifier", "name": "test", "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } }, "params": [ { "type": "Identifier", "name": "t", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "name": "t", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 21, 24 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 24 } } }, "generator": false, "expression": false, "async": false, "range": [ 1, 24 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 24 } } }, "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "function", "range": [ 1, 9 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "test", "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "t", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ",", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "t", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ")", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "{", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "}", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": ")", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ], "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } esprima-4.0.1/test/fixtures/declaration/function/migrated_0005.js000066400000000000000000000000651331122015500247060ustar00rootroot00000000000000function eval() { function inner() { "use strict" } }esprima-4.0.1/test/fixtures/declaration/function/migrated_0005.tree.json000066400000000000000000000257441331122015500262140ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "eval", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "inner", "range": [ 27, 32 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 32 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 37, 49 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 49 } } }, "directive": "use strict", "range": [ 37, 50 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 50 } } } ], "range": [ 35, 51 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 51 } } }, "generator": false, "expression": false, "async": false, "range": [ 18, 51 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 51 } } } ], "range": [ 16, 53 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 53 } } }, "generator": false, "expression": false, "async": false, "range": [ 0, 53 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 53 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "eval", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ")", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "{", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Keyword", "value": "function", "range": [ 18, 26 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "inner", "range": [ 27, 32 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "(", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": ")", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "{", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "String", "value": "\"use strict\"", "range": [ 37, 49 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 49 } } }, { "type": "Punctuator", "value": "}", "range": [ 50, 51 ], "loc": { "start": { "line": 1, "column": 50 }, "end": { "line": 1, "column": 51 } } }, { "type": "Punctuator", "value": "}", "range": [ 52, 53 ], "loc": { "start": { "line": 1, "column": 52 }, "end": { "line": 1, "column": 53 } } } ], "range": [ 0, 53 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 53 } } } esprima-4.0.1/test/fixtures/declaration/function/migrated_0006.js000066400000000000000000000000361331122015500247050ustar00rootroot00000000000000function hello(a) { sayHi(); }esprima-4.0.1/test/fixtures/declaration/function/migrated_0006.tree.json000066400000000000000000000214471331122015500262110ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "hello", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, "params": [ { "type": "Identifier", "name": "a", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "sayHi", "range": [ 20, 25 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 25 } } }, "arguments": [], "range": [ 20, 27 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 27 } } }, "range": [ 20, 28 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 28 } } } ], "range": [ 18, 30 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 30 } } }, "generator": false, "expression": false, "async": false, "range": [ 0, 30 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "hello", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "a", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "value": "sayHi", "range": [ 20, 25 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "(", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": ")", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": ";", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "}", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } } ], "range": [ 0, 30 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } } } esprima-4.0.1/test/fixtures/declaration/function/migrated_0007.js000066400000000000000000000000411331122015500247020ustar00rootroot00000000000000function hello(a, b) { sayHi(); }esprima-4.0.1/test/fixtures/declaration/function/migrated_0007.tree.json000066400000000000000000000242041331122015500262040ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "hello", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, "params": [ { "type": "Identifier", "name": "a", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "name": "b", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "sayHi", "range": [ 23, 28 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 28 } } }, "arguments": [], "range": [ 23, 30 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 30 } } }, "range": [ 23, 31 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 21, 33 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 33 } } }, "generator": false, "expression": false, "async": false, "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "hello", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "a", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ",", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "b", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ")", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "{", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "sayHi", "range": [ 23, 28 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "(", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": ")", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": ";", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "}", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } } ], "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } } } esprima-4.0.1/test/fixtures/declaration/function/migrated_0008.js000066400000000000000000000000401331122015500247020ustar00rootroot00000000000000var hi = function() { sayHi() };esprima-4.0.1/test/fixtures/declaration/function/migrated_0008.tree.json000066400000000000000000000255561331122015500262200ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "hi", "range": [ 4, 6 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 6 } } }, "init": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "sayHi", "range": [ 22, 27 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 27 } } }, "arguments": [], "range": [ 22, 29 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 29 } } }, "range": [ 22, 30 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 30 } } } ], "range": [ 20, 31 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 31 } } }, "generator": false, "expression": false, "async": false, "range": [ 9, 31 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 31 } } }, "range": [ 4, 31 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 31 } } } ], "kind": "var", "range": [ 0, 32 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 32 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "hi", "range": [ 4, 6 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "=", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Keyword", "value": "function", "range": [ 9, 17 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "(", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "{", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "sayHi", "range": [ 22, 27 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "(", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": ")", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "}", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": ";", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } } ], "range": [ 0, 32 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 32 } } } esprima-4.0.1/test/fixtures/declaration/function/migrated_0009.js000066400000000000000000000000351331122015500247070ustar00rootroot00000000000000var hi = function eval() { };esprima-4.0.1/test/fixtures/declaration/function/migrated_0009.tree.json000066400000000000000000000200141331122015500262010ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "hi", "range": [ 4, 6 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 6 } } }, "init": { "type": "FunctionExpression", "id": { "type": "Identifier", "name": "eval", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 25, 28 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 28 } } }, "generator": false, "expression": false, "async": false, "range": [ 9, 28 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 28 } } }, "range": [ 4, 28 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 28 } } } ], "kind": "var", "range": [ 0, 29 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 29 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "hi", "range": [ 4, 6 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "=", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Keyword", "value": "function", "range": [ 9, 17 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "eval", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "(", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ")", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "{", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "}", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": ";", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } } ], "range": [ 0, 29 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 29 } } } esprima-4.0.1/test/fixtures/declaration/function/migrated_0010.js000066400000000000000000000000421331122015500246750ustar00rootroot00000000000000var hi = function arguments() { };esprima-4.0.1/test/fixtures/declaration/function/migrated_0010.tree.json000066400000000000000000000200261331122015500261740ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "hi", "range": [ 4, 6 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 6 } } }, "init": { "type": "FunctionExpression", "id": { "type": "Identifier", "name": "arguments", "range": [ 18, 27 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 27 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 30, 33 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 33 } } }, "generator": false, "expression": false, "async": false, "range": [ 9, 33 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 33 } } }, "range": [ 4, 33 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 33 } } } ], "kind": "var", "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "hi", "range": [ 4, 6 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "=", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Keyword", "value": "function", "range": [ 9, 17 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "arguments", "range": [ 18, 27 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "(", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": ")", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "{", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "}", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": ";", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } } ], "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } esprima-4.0.1/test/fixtures/declaration/function/migrated_0011.js000066400000000000000000000000461331122015500247020ustar00rootroot00000000000000var hello = function hi() { sayHi() };esprima-4.0.1/test/fixtures/declaration/function/migrated_0011.tree.json000066400000000000000000000276631331122015500262130ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "hello", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, "init": { "type": "FunctionExpression", "id": { "type": "Identifier", "name": "hi", "range": [ 21, 23 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 23 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "sayHi", "range": [ 28, 33 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 33 } } }, "arguments": [], "range": [ 28, 35 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 35 } } }, "range": [ 28, 36 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 36 } } } ], "range": [ 26, 37 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 37 } } }, "generator": false, "expression": false, "async": false, "range": [ 12, 37 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 37 } } }, "range": [ 4, 37 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 37 } } } ], "kind": "var", "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "hello", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "=", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Keyword", "value": "function", "range": [ 12, 20 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "hi", "range": [ 21, 23 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "(", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": ")", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "{", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Identifier", "value": "sayHi", "range": [ 28, 33 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "(", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ")", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": "}", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": ";", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } } ], "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } esprima-4.0.1/test/fixtures/declaration/function/migrated_0012.js000066400000000000000000000000161331122015500247000ustar00rootroot00000000000000(function(){})esprima-4.0.1/test/fixtures/declaration/function/migrated_0012.tree.json000066400000000000000000000112361331122015500262010ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 11, 13 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 13 } } }, "generator": false, "expression": false, "async": false, "range": [ 1, 13 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "function", "range": [ 1, 9 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "(", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ")", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "{", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "}", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } esprima-4.0.1/test/fixtures/declaration/function/migrated_0013.js000066400000000000000000000000401331122015500246760ustar00rootroot00000000000000function universe(__proto__) { }esprima-4.0.1/test/fixtures/declaration/function/migrated_0013.tree.json000066400000000000000000000122161331122015500262010ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "universe", "range": [ 9, 17 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } }, "params": [ { "type": "Identifier", "name": "__proto__", "range": [ 18, 27 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 27 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 29, 32 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 32 } } }, "generator": false, "expression": false, "async": false, "range": [ 0, 32 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 32 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "universe", "range": [ 9, 17 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "(", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "__proto__", "range": [ 18, 27 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": ")", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "{", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": "}", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } } ], "range": [ 0, 32 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 32 } } } esprima-4.0.1/test/fixtures/declaration/function/migrated_0014.js000066400000000000000000000000461331122015500247050ustar00rootroot00000000000000function test() { "use strict" + 42; }esprima-4.0.1/test/fixtures/declaration/function/migrated_0014.tree.json000066400000000000000000000213111331122015500261760ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "test", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 18, 30 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 30 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 33, 35 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 35 } } }, "range": [ 18, 35 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 35 } } }, "range": [ 18, 36 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 36 } } } ], "range": [ 16, 38 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 38 } } }, "generator": false, "expression": false, "async": false, "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "test", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ")", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "{", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "String", "value": "\"use strict\"", "range": [ 18, 30 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": "+", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Numeric", "value": "42", "range": [ 33, 35 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": ";", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": "}", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } } ], "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } esprima-4.0.1/test/fixtures/declaration/let/000077500000000000000000000000001331122015500210465ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/declaration/let/migrated_0000.js000066400000000000000000000000051331122015500236320ustar00rootroot00000000000000let xesprima-4.0.1/test/fixtures/declaration/let/migrated_0000.tree.json000066400000000000000000000053161331122015500251370ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": null, "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "kind": "let", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "let", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/declaration/let/migrated_0001.js000066400000000000000000000000111331122015500236300ustar00rootroot00000000000000{ let x }esprima-4.0.1/test/fixtures/declaration/let/migrated_0001.tree.json000066400000000000000000000105361331122015500251400ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "init": null, "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "kind": "let", "range": [ 2, 8 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 8 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "{", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "let", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "}", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/declaration/let/migrated_0002.js000066400000000000000000000000161331122015500236360ustar00rootroot00000000000000{ let x = 42 }esprima-4.0.1/test/fixtures/declaration/let/migrated_0002.tree.json000066400000000000000000000136411331122015500251410ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "init": { "type": "Literal", "value": 42, "raw": "42", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, "range": [ 6, 12 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 12 } } } ], "kind": "let", "range": [ 2, 13 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "{", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "let", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "=", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Numeric", "value": "42", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "}", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } esprima-4.0.1/test/fixtures/declaration/let/migrated_0003.js000066400000000000000000000000371331122015500236420ustar00rootroot00000000000000{ let x = 14, y = 3, z = 1977 }esprima-4.0.1/test/fixtures/declaration/let/migrated_0003.tree.json000066400000000000000000000330241331122015500251370ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "BlockStatement", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "init": { "type": "Literal", "value": 14, "raw": "14", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, "range": [ 6, 12 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 12 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "y", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, "init": { "type": "Literal", "value": 3, "raw": "3", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, "range": [ 14, 19 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 19 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "z", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, "init": { "type": "Literal", "value": 1977, "raw": "1977", "range": [ 25, 29 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 29 } } }, "range": [ 21, 29 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 29 } } } ], "kind": "let", "range": [ 2, 30 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 30 } } } ], "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "{", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "let", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "=", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Numeric", "value": "14", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ",", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "y", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "=", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Numeric", "value": "3", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ",", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "z", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "=", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Numeric", "value": "1977", "range": [ 25, 29 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "}", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } } } esprima-4.0.1/test/fixtures/directive-prolog/000077500000000000000000000000001331122015500212535ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/directive-prolog/migrated_0000.js000066400000000000000000000000561331122015500240450ustar00rootroot00000000000000(function () { 'use\x20strict'; with (i); }())esprima-4.0.1/test/fixtures/directive-prolog/migrated_0000.tree.json000066400000000000000000000317051331122015500253450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "'use\\x20strict'", "range": [ 15, 30 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 30 } } }, "directive": "use\\x20strict", "range": [ 15, 31 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 31 } } }, { "type": "WithStatement", "object": { "type": "Identifier", "name": "i", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, "body": { "type": "EmptyStatement", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } }, "range": [ 32, 41 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 41 } } } ], "range": [ 13, 43 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 43 } } }, "generator": false, "expression": false, "async": false, "range": [ 1, 43 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 43 } } }, "arguments": [], "range": [ 1, 45 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 45 } } }, "range": [ 0, 46 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 46 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "function", "range": [ 1, 9 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "String", "value": "'use\\x20strict'", "range": [ 15, 30 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": ";", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Keyword", "value": "with", "range": [ 32, 36 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": "(", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Identifier", "value": "i", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, { "type": "Punctuator", "value": ")", "range": [ 39, 40 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 40 } } }, { "type": "Punctuator", "value": ";", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } }, { "type": "Punctuator", "value": "}", "range": [ 42, 43 ], "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 43 } } }, { "type": "Punctuator", "value": "(", "range": [ 43, 44 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 44 } } }, { "type": "Punctuator", "value": ")", "range": [ 44, 45 ], "loc": { "start": { "line": 1, "column": 44 }, "end": { "line": 1, "column": 45 } } }, { "type": "Punctuator", "value": ")", "range": [ 45, 46 ], "loc": { "start": { "line": 1, "column": 45 }, "end": { "line": 1, "column": 46 } } } ], "range": [ 0, 46 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 46 } } } esprima-4.0.1/test/fixtures/directive-prolog/migrated_0001.js000066400000000000000000000000541331122015500240440ustar00rootroot00000000000000(function () { 'use\nstrict'; with (i); }())esprima-4.0.1/test/fixtures/directive-prolog/migrated_0001.tree.json000066400000000000000000000317001331122015500253410ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use\nstrict", "raw": "'use\\nstrict'", "range": [ 15, 28 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 28 } } }, "directive": "use\\nstrict", "range": [ 15, 29 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 29 } } }, { "type": "WithStatement", "object": { "type": "Identifier", "name": "i", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, "body": { "type": "EmptyStatement", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, "range": [ 30, 39 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 39 } } } ], "range": [ 13, 41 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 41 } } }, "generator": false, "expression": false, "async": false, "range": [ 1, 41 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 41 } } }, "arguments": [], "range": [ 1, 43 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 43 } } }, "range": [ 0, 44 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 44 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "function", "range": [ 1, 9 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "String", "value": "'use\\nstrict'", "range": [ 15, 28 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": ";", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Keyword", "value": "with", "range": [ 30, 34 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "(", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Identifier", "value": "i", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": ")", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": ";", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, { "type": "Punctuator", "value": "}", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } }, { "type": "Punctuator", "value": "(", "range": [ 41, 42 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 42 } } }, { "type": "Punctuator", "value": ")", "range": [ 42, 43 ], "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 43 } } }, { "type": "Punctuator", "value": ")", "range": [ 43, 44 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 44 } } } ], "range": [ 0, 44 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 44 } } } esprima-4.0.1/test/fixtures/es2017/000077500000000000000000000000001331122015500167165ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/000077500000000000000000000000001331122015500200335ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/arrows/000077500000000000000000000000001331122015500213505ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/arrows/assigned-async-arrow.js000066400000000000000000000000631331122015500257450ustar00rootroot00000000000000id = async x => x, square = async (y) => { y * y } esprima-4.0.1/test/fixtures/es2017/async/arrows/assigned-async-arrow.tree.json000066400000000000000000000505521331122015500272500ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "SequenceExpression", "expressions": [ { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "id", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, "right": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } } ], "body": { "type": "Identifier", "name": "x", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "generator": false, "expression": true, "async": true, "range": [ 5, 17 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } }, { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "square", "range": [ 19, 25 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 25 } } }, "right": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "y", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "y", "range": [ 43, 44 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 44 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 47, 48 ], "loc": { "start": { "line": 1, "column": 47 }, "end": { "line": 1, "column": 48 } } }, "range": [ 43, 48 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 48 } } }, "range": [ 43, 49 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 49 } } } ], "range": [ 41, 50 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 50 } } }, "generator": false, "expression": false, "async": true, "range": [ 28, 50 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 50 } } }, "range": [ 19, 50 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 50 } } } ], "range": [ 0, 50 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 50 } } }, "range": [ 0, 50 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 50 } } } ], "sourceType": "script", "range": [ 0, 50 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 50 } }, "tokens": [ { "type": "Identifier", "value": "id", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "=", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "async", "range": [ 5, 10 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "x", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "=>", "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "x", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ",", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "square", "range": [ 19, 25 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "=", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Identifier", "value": "async", "range": [ 28, 33 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "(", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Identifier", "value": "y", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": ")", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": "=>", "range": [ 38, 40 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 40 } } }, { "type": "Punctuator", "value": "{", "range": [ 41, 42 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 42 } } }, { "type": "Identifier", "value": "y", "range": [ 43, 44 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 44 } } }, { "type": "Punctuator", "value": "*", "range": [ 45, 46 ], "loc": { "start": { "line": 1, "column": 45 }, "end": { "line": 1, "column": 46 } } }, { "type": "Identifier", "value": "y", "range": [ 47, 48 ], "loc": { "start": { "line": 1, "column": 47 }, "end": { "line": 1, "column": 48 } } }, { "type": "Punctuator", "value": "}", "range": [ 49, 50 ], "loc": { "start": { "line": 1, "column": 49 }, "end": { "line": 1, "column": 50 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-as-last-parameter.js000066400000000000000000000000311331122015500274650ustar00rootroot00000000000000f(a, async b => await b) esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-as-last-parameter.tree.json000066400000000000000000000224751331122015500310000ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "arguments": [ { "type": "Identifier", "name": "a", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "b", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } } ], "body": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "b", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "range": [ 16, 23 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 23 } } }, "generator": false, "expression": true, "async": true, "range": [ 5, 23 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 23 } } } ], "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } }, "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } ], "sourceType": "script", "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } }, "tokens": [ { "type": "Identifier", "value": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "(", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "a", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": ",", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "async", "range": [ 5, 10 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "b", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "=>", "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "await", "range": [ 16, 21 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "b", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ")", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-as-parameter.js000066400000000000000000000000461331122015500265320ustar00rootroot00000000000000f(a, async (b, c) => await [b, c], d) esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-as-parameter.tree.json000066400000000000000000000407751331122015500300420ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "arguments": [ { "type": "Identifier", "name": "a", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "b", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "name": "c", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ], "body": { "type": "AwaitExpression", "argument": { "type": "ArrayExpression", "elements": [ { "type": "Identifier", "name": "b", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Identifier", "name": "c", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } } ], "range": [ 27, 33 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 33 } } }, "range": [ 21, 33 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 33 } } }, "generator": false, "expression": true, "async": true, "range": [ 5, 33 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 33 } } }, { "type": "Identifier", "name": "d", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } } ], "range": [ 0, 37 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 37 } } }, "range": [ 0, 37 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 37 } } } ], "sourceType": "script", "range": [ 0, 37 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 37 } }, "tokens": [ { "type": "Identifier", "value": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "(", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "a", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": ",", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "async", "range": [ 5, 10 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "b", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ",", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "c", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "=>", "range": [ 18, 20 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "await", "range": [ 21, 26 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "[", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Identifier", "value": "b", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": ",", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Identifier", "value": "c", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "]", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": ",", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Identifier", "value": "d", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": ")", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-multi-args-await.js000066400000000000000000000000341331122015500273350ustar00rootroot00000000000000async (a, b) => { await a } esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-multi-args-await.tree.json000066400000000000000000000233371331122015500306430ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "name": "b", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, "range": [ 18, 25 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 25 } } }, "range": [ 18, 26 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 26 } } } ], "range": [ 16, 27 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 27 } } }, "generator": false, "expression": false, "async": true, "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } } }, "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } } } ], "sourceType": "script", "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "a", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ",", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "b", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "=>", "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "{", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "await", "range": [ 18, 23 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "a", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "}", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-multi-args-concise-await.js000066400000000000000000000000301331122015500307520ustar00rootroot00000000000000async (a, b) => await a esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-multi-args-concise-await.tree.json000066400000000000000000000164371331122015500322670ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "name": "b", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "body": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "range": [ 16, 23 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 23 } } }, "generator": false, "expression": true, "async": true, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } }, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "a", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ",", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "b", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "=>", "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "await", "range": [ 16, 21 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "a", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-multi-args-concise.js000066400000000000000000000000221331122015500276500ustar00rootroot00000000000000async (x, y) => y esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-multi-args-concise.tree.json000066400000000000000000000144401331122015500311540ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "name": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "body": { "type": "Identifier", "name": "y", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "generator": false, "expression": true, "async": true, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } ], "sourceType": "script", "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ",", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "=>", "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "y", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-multi-args.js000066400000000000000000000000321331122015500262300ustar00rootroot00000000000000async (x, y) => { x * y } esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-multi-args.tree.json000066400000000000000000000257651331122015500275470ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "name": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "x", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "range": [ 18, 23 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 23 } } }, "range": [ 18, 24 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 16, 25 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 25 } } }, "generator": false, "expression": false, "async": true, "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } }, "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } ], "sourceType": "script", "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ",", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "=>", "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "{", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "x", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "*", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "y", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "}", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-no-arg.js000066400000000000000000000000171331122015500253320ustar00rootroot00000000000000async () => 42 esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-no-arg.tree.json000066400000000000000000000076021331122015500266340ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [], "body": { "type": "Literal", "value": 42, "raw": "42", "range": [ 12, 14 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 14 } } }, "generator": false, "expression": true, "async": true, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "sourceType": "script", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ")", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "=>", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } }, { "type": "Numeric", "value": "42", "range": [ 12, 14 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 14 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-object-pattern-parameter.js000066400000000000000000000000301331122015500310410ustar00rootroot00000000000000async ({x: y = z}) => x esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-object-pattern-parameter.tree.json000066400000000000000000000271661331122015500323570ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "ObjectPattern", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "computed": false, "value": { "type": "AssignmentPattern", "left": { "type": "Identifier", "name": "y", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, "range": [ 11, 16 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 16 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 8, 16 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 7, 17 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 17 } } } ], "body": { "type": "Identifier", "name": "x", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "generator": false, "expression": true, "async": true, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } }, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ":", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "y", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "=", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "z", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "}", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ")", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "=>", "range": [ 19, 21 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "x", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-one-arg-await.js000066400000000000000000000000271331122015500266030ustar00rootroot00000000000000async a => { await a } esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-one-arg-await.tree.json000066400000000000000000000170141331122015500301020ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, "range": [ 13, 20 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 20 } } }, "range": [ 13, 21 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 11, 22 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 22 } } }, "generator": false, "expression": false, "async": true, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "a", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "=>", "range": [ 8, 10 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "{", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "await", "range": [ 13, 18 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "a", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "}", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-one-arg-concise-await.js000066400000000000000000000000231331122015500302200ustar00rootroot00000000000000async a => await a esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-one-arg-concise-await.tree.json000066400000000000000000000121141331122015500315170ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "body": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, "range": [ 11, 18 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 18 } } }, "generator": false, "expression": true, "async": true, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } }, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } ], "sourceType": "script", "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "a", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "=>", "range": [ 8, 10 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "await", "range": [ 11, 16 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "a", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-one-arg-concise.js000066400000000000000000000000151331122015500271160ustar00rootroot00000000000000async y => y esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-one-arg-concise.tree.json000066400000000000000000000101151331122015500304130ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "y", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "body": { "type": "Identifier", "name": "y", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, "generator": false, "expression": true, "async": true, "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } } ], "sourceType": "script", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "y", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "=>", "range": [ 8, 10 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "y", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-one-arg.js000066400000000000000000000000251331122015500254760ustar00rootroot00000000000000async x => { x * x } esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-one-arg.tree.json000066400000000000000000000214421331122015500267770ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "x", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, "right": { "type": "Identifier", "name": "x", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, "range": [ 13, 18 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 18 } } }, "range": [ 13, 19 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 19 } } } ], "range": [ 11, 20 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 20 } } }, "generator": false, "expression": false, "async": true, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } ], "sourceType": "script", "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "=>", "range": [ 8, 10 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "{", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "x", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "*", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "x", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "}", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-parenthesized-await.js000066400000000000000000000000311331122015500301130ustar00rootroot00000000000000async (a) => { await a } esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-parenthesized-await.tree.json000066400000000000000000000204721331122015500314210ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, "range": [ 15, 22 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 22 } } }, "range": [ 15, 23 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 23 } } } ], "range": [ 13, 24 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 24 } } }, "generator": false, "expression": false, "async": true, "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } }, "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } ], "sourceType": "script", "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "a", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "=>", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "await", "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "a", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "}", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-parenthesized-concise-await.js000066400000000000000000000000251331122015500315370ustar00rootroot00000000000000async (a) => await a esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-parenthesized-concise-await.tree.json000066400000000000000000000135721331122015500330450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } } ], "body": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, "range": [ 13, 20 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 20 } } }, "generator": false, "expression": true, "async": true, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } ], "sourceType": "script", "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "a", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "=>", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "await", "range": [ 13, 18 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "a", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-parenthesized-concise.js000066400000000000000000000000171331122015500304350ustar00rootroot00000000000000async (y) => y esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-parenthesized-concise.tree.json000066400000000000000000000115731331122015500317410ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "y", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } } ], "body": { "type": "Identifier", "name": "y", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, "generator": false, "expression": true, "async": true, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "sourceType": "script", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "y", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "=>", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "y", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-parenthesized-yield.js000066400000000000000000000000241331122015500301160ustar00rootroot00000000000000async (yield) => 1; esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-parenthesized-yield.tree.json000066400000000000000000000124731331122015500314240ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "yield", "range": [ 7, 12 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } } } ], "body": { "type": "Literal", "value": 1, "raw": "1", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, "generator": false, "expression": true, "async": true, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } }, "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } } ], "sourceType": "script", "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Keyword", "value": "yield", "range": [ 7, 12 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ")", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "=>", "range": [ 14, 16 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 16 } } }, { "type": "Numeric", "value": "1", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ";", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-parenthesized.js000066400000000000000000000000271331122015500270150ustar00rootroot00000000000000async (x) => { x * x } esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-parenthesized.tree.json000066400000000000000000000231201331122015500303070ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "x", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, "right": { "type": "Identifier", "name": "x", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } }, "range": [ 15, 21 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 13, 22 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 22 } } }, "generator": false, "expression": false, "async": true, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "=>", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "x", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "*", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "x", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "}", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-pattern-parameter.js000066400000000000000000000000251331122015500276010ustar00rootroot00000000000000async ({x = y}) => z esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-pattern-parameter.tree.json000066400000000000000000000254751331122015500311140ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "ObjectPattern", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "computed": false, "value": { "type": "AssignmentPattern", "left": { "type": "Identifier", "name": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, "range": [ 8, 13 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 13 } } }, "kind": "init", "method": false, "shorthand": true, "range": [ 8, 13 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 7, 14 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 14 } } } ], "body": { "type": "Identifier", "name": "z", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, "generator": false, "expression": true, "async": true, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } ], "sourceType": "script", "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "=", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "y", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "}", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ")", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "=>", "range": [ 16, 18 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "z", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-rest.js000066400000000000000000000000251331122015500251230ustar00rootroot00000000000000async (x, ...y) => x esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-rest.tree.json000066400000000000000000000165351331122015500264330ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "RestElement", "argument": { "type": "Identifier", "name": "y", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } } ], "body": { "type": "Identifier", "name": "x", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, "generator": false, "expression": true, "async": true, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } ], "sourceType": "script", "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ",", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "...", "range": [ 10, 13 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "y", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ")", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "=>", "range": [ 16, 18 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "x", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-trailing-comma.js000066400000000000000000000000221331122015500270460ustar00rootroot00000000000000async (x,y,) => x esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-trailing-comma.tree.json000066400000000000000000000152661331122015500303610ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "name": "y", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } } ], "body": { "type": "Identifier", "name": "x", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "generator": false, "expression": true, "async": true, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } ], "sourceType": "script", "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ",", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "y", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ",", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "=>", "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "x", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-yield.js000066400000000000000000000000221331122015500252510ustar00rootroot00000000000000async yield => 0; esprima-4.0.1/test/fixtures/es2017/async/arrows/async-arrow-yield.tree.json000066400000000000000000000110131331122015500265460ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "yield", "range": [ 6, 11 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 11 } } } ], "body": { "type": "Literal", "value": 0, "raw": "0", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, "generator": false, "expression": true, "async": true, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } ], "sourceType": "script", "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "yield", "range": [ 6, 11 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "=>", "range": [ 12, 14 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 14 } } }, { "type": "Numeric", "value": "0", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ";", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/export-async-arrow.module.js000066400000000000000000000000471331122015500267570ustar00rootroot00000000000000export const square = async x => x * x esprima-4.0.1/test/fixtures/es2017/async/arrows/export-async-arrow.module.tree.json000066400000000000000000000253521331122015500302600ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "square", "range": [ 13, 19 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 19 } } }, "init": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } } ], "body": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "x", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, "right": { "type": "Identifier", "name": "x", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, "range": [ 33, 38 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 38 } } }, "generator": false, "expression": true, "async": true, "range": [ 22, 38 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 38 } } }, "range": [ 13, 38 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 38 } } } ], "kind": "const", "range": [ 7, 38 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 38 } } }, "specifiers": [], "source": null, "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } ], "sourceType": "module", "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } }, "tokens": [ { "type": "Keyword", "value": "export", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": "Keyword", "value": "const", "range": [ 7, 12 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "square", "range": [ 13, 19 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "=", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "async", "range": [ 22, 27 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 27 } } }, { "type": "Identifier", "value": "x", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "=>", "range": [ 30, 32 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 32 } } }, { "type": "Identifier", "value": "x", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "*", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Identifier", "value": "x", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/export-default-async-arrow.module.js000066400000000000000000000000401331122015500303720ustar00rootroot00000000000000export default async x => x * x esprima-4.0.1/test/fixtures/es2017/async/arrows/export-default-async-arrow.module.tree.json000066400000000000000000000157071331122015500317050ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExportDefaultDeclaration", "declaration": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ], "body": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "x", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, "right": { "type": "Identifier", "name": "x", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, "range": [ 26, 31 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 31 } } }, "generator": false, "expression": true, "async": true, "range": [ 15, 31 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 31 } } }, "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } } } ], "sourceType": "module", "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } }, "tokens": [ { "type": "Keyword", "value": "export", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": "Keyword", "value": "default", "range": [ 7, 14 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "async", "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "x", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "=>", "range": [ 23, 25 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 25 } } }, { "type": "Identifier", "value": "x", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "*", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Identifier", "value": "x", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/arrows/invalid-async-line-terminator1.failure.json000066400000000000000000000001711331122015500316210ustar00rootroot00000000000000{"index":10,"lineNumber":2,"column":5,"message":"Error: Line 2: Unexpected token =>","description":"Unexpected token =>"}esprima-4.0.1/test/fixtures/es2017/async/arrows/invalid-async-line-terminator1.js000066400000000000000000000000251331122015500276340ustar00rootroot00000000000000async (a) => await a esprima-4.0.1/test/fixtures/es2017/async/arrows/invalid-async-line-terminator2.failure.json000066400000000000000000000001721331122015500316230ustar00rootroot00000000000000{"index":10,"lineNumber":2,"column":11,"message":"Error: Line 2: Unexpected token =>","description":"Unexpected token =>"}esprima-4.0.1/test/fixtures/es2017/async/arrows/invalid-async-line-terminator2.js000066400000000000000000000000251331122015500276350ustar00rootroot00000000000000async (a) => await a esprima-4.0.1/test/fixtures/es2017/async/arrows/invalid-async-line-terminator3.failure.json000066400000000000000000000001701331122015500316220ustar00rootroot00000000000000{"index":9,"lineNumber":2,"column":4,"message":"Error: Line 2: Unexpected token =>","description":"Unexpected token =>"}esprima-4.0.1/test/fixtures/es2017/async/arrows/invalid-async-line-terminator3.js000066400000000000000000000000161331122015500276360ustar00rootroot00000000000000async () => 0 esprima-4.0.1/test/fixtures/es2017/async/arrows/invalid-async-line-terminator4.failure.json000066400000000000000000000001711331122015500316240ustar00rootroot00000000000000{"index":9,"lineNumber":2,"column":10,"message":"Error: Line 2: Unexpected token =>","description":"Unexpected token =>"}esprima-4.0.1/test/fixtures/es2017/async/arrows/invalid-async-line-terminator4.js000066400000000000000000000000161331122015500276370ustar00rootroot00000000000000async () => 0 esprima-4.0.1/test/fixtures/es2017/async/arrows/invalid-async-line-terminator5.failure.json000066400000000000000000000001701331122015500316240ustar00rootroot00000000000000{"index":8,"lineNumber":2,"column":9,"message":"Error: Line 2: Unexpected token =>","description":"Unexpected token =>"}esprima-4.0.1/test/fixtures/es2017/async/arrows/invalid-async-line-terminator5.js000066400000000000000000000000231331122015500276360ustar00rootroot00000000000000async a => await a esprima-4.0.1/test/fixtures/es2017/async/functions/000077500000000000000000000000001331122015500220435ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/functions/argument-async-function-expression.js000066400000000000000000000000411331122015500313510ustar00rootroot00000000000000f(async function(x) { await x }) esprima-4.0.1/test/fixtures/es2017/async/functions/argument-async-function-expression.tree.json000066400000000000000000000266621331122015500326650ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "arguments": [ { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "x", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, "range": [ 22, 29 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 29 } } }, "range": [ 22, 30 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 30 } } } ], "range": [ 20, 31 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 31 } } }, "generator": false, "expression": false, "async": true, "range": [ 2, 31 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 0, 32 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 32 } } }, "range": [ 0, 32 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 32 } } } ], "sourceType": "script", "range": [ 0, 32 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 32 } }, "tokens": [ { "type": "Identifier", "value": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "(", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "async", "range": [ 2, 7 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 7 } } }, { "type": "Keyword", "value": "function", "range": [ 8, 16 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "(", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "x", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "{", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "await", "range": [ 22, 27 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 27 } } }, { "type": "Identifier", "value": "x", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "}", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": ")", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/functions/async-function-declaration-await.js000066400000000000000000000000401331122015500307210ustar00rootroot00000000000000async function f(a) { await a } esprima-4.0.1/test/fixtures/es2017/async/functions/async-function-declaration-await.tree.json000066400000000000000000000205331331122015500322250ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, "params": [ { "type": "Identifier", "name": "a", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, "range": [ 22, 29 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 29 } } }, "range": [ 22, 30 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 30 } } } ], "range": [ 20, 31 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 31 } } }, "generator": false, "expression": false, "async": true, "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } } } ], "sourceType": "script", "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "function", "range": [ 6, 14 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "f", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "(", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "a", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "{", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "await", "range": [ 22, 27 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 27 } } }, { "type": "Identifier", "value": "a", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "}", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/functions/async-function-declaration.js000066400000000000000000000000261331122015500276220ustar00rootroot00000000000000async function f() {} esprima-4.0.1/test/fixtures/es2017/async/functions/async-function-declaration.tree.json000066400000000000000000000110771331122015500311250ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 19, 21 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 21 } } }, "generator": false, "expression": false, "async": true, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } ], "sourceType": "script", "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "function", "range": [ 6, 14 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "f", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "(", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ")", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "{", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "}", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/functions/async-function-expression-as-parameter.js000066400000000000000000000000471331122015500321160ustar00rootroot00000000000000f(b, async function(b) { await b }, c) esprima-4.0.1/test/fixtures/es2017/async/functions/async-function-expression-as-parameter.tree.json000066400000000000000000000343641331122015500334220ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "arguments": [ { "type": "Identifier", "name": "b", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "b", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "b", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, "range": [ 25, 32 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 32 } } }, "range": [ 25, 33 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 33 } } } ], "range": [ 23, 34 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 34 } } }, "generator": false, "expression": false, "async": true, "range": [ 5, 34 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 34 } } }, { "type": "Identifier", "name": "c", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } } ], "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } }, "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } ], "sourceType": "script", "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } }, "tokens": [ { "type": "Identifier", "value": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "(", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "b", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": ",", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "async", "range": [ 5, 10 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 10 } } }, { "type": "Keyword", "value": "function", "range": [ 11, 19 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "(", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "b", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ")", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "{", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Identifier", "value": "await", "range": [ 25, 30 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 30 } } }, { "type": "Identifier", "value": "b", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ",", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Identifier", "value": "c", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": ")", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/functions/async-function-expression-await.js000066400000000000000000000000421331122015500306350ustar00rootroot00000000000000x = async function(a) { await a } esprima-4.0.1/test/fixtures/es2017/async/functions/async-function-expression-await.tree.json000066400000000000000000000251271331122015500321430ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, "range": [ 24, 31 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 31 } } }, "range": [ 24, 32 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 32 } } } ], "range": [ 22, 33 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 33 } } }, "generator": false, "expression": false, "async": true, "range": [ 4, 33 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 33 } } }, "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } } }, "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } } } ], "sourceType": "script", "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } }, "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "async", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "function", "range": [ 10, 18 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "(", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "value": "a", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": ")", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "{", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "await", "range": [ 24, 29 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 29 } } }, { "type": "Identifier", "value": "a", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "}", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/functions/async-function-expression-named-await.js000066400000000000000000000000441331122015500317210ustar00rootroot00000000000000x = async function f(a) { await a } esprima-4.0.1/test/fixtures/es2017/async/functions/async-function-expression-named-await.tree.json000066400000000000000000000271101331122015500332170ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "FunctionExpression", "id": { "type": "Identifier", "name": "f", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, "params": [ { "type": "Identifier", "name": "a", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, "range": [ 26, 33 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 33 } } }, "range": [ 26, 34 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 34 } } } ], "range": [ 24, 35 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 35 } } }, "generator": false, "expression": false, "async": true, "range": [ 4, 35 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 35 } } }, "range": [ 0, 35 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 35 } } }, "range": [ 0, 35 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 35 } } } ], "sourceType": "script", "range": [ 0, 35 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 35 } }, "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "async", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "function", "range": [ 10, 18 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "f", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "(", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "a", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "{", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Identifier", "value": "await", "range": [ 26, 31 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 31 } } }, { "type": "Identifier", "value": "a", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "}", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/functions/async-function-expression-named.js000066400000000000000000000000321331122015500306130ustar00rootroot00000000000000a = async function f() {} esprima-4.0.1/test/fixtures/es2017/async/functions/async-function-expression-named.tree.json000066400000000000000000000163541331122015500321240ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "a", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "FunctionExpression", "id": { "type": "Identifier", "name": "f", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 23, 25 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 25 } } }, "generator": false, "expression": false, "async": true, "range": [ 4, 25 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 25 } } }, "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } }, "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } ], "sourceType": "script", "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } }, "tokens": [ { "type": "Identifier", "value": "a", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "async", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "function", "range": [ 10, 18 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "f", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "(", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ")", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "{", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "}", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/functions/async-function-expression.js000066400000000000000000000000301331122015500275270ustar00rootroot00000000000000a = async function() {} esprima-4.0.1/test/fixtures/es2017/async/functions/async-function-expression.tree.json000066400000000000000000000143731331122015500310410ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "a", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 21, 23 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 23 } } }, "generator": false, "expression": false, "async": true, "range": [ 4, 23 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 23 } } }, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } }, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } }, "tokens": [ { "type": "Identifier", "value": "a", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "async", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "function", "range": [ 10, 18 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "(", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ")", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "{", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "}", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/functions/async-if-await.js000066400000000000000000000000471331122015500252160ustar00rootroot00000000000000if (x) async function f(a) { await a } esprima-4.0.1/test/fixtures/es2017/async/functions/async-if-await.tree.json000066400000000000000000000265121331122015500265160ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "IfStatement", "test": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "consequent": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "params": [ { "type": "Identifier", "name": "a", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, "range": [ 29, 36 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 36 } } }, "range": [ 29, 37 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 37 } } } ], "range": [ 27, 38 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 38 } } }, "generator": false, "expression": false, "async": true, "range": [ 7, 38 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 38 } } }, "alternate": null, "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } ], "sourceType": "script", "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } }, "tokens": [ { "type": "Keyword", "value": "if", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ")", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "async", "range": [ 7, 12 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } } }, { "type": "Keyword", "value": "function", "range": [ 13, 21 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "f", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "(", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Identifier", "value": "a", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ")", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "{", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Identifier", "value": "await", "range": [ 29, 34 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 34 } } }, { "type": "Identifier", "value": "a", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": "}", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/functions/async-if.js000066400000000000000000000000351331122015500241100ustar00rootroot00000000000000if (x) async function f() {} esprima-4.0.1/test/fixtures/es2017/async/functions/async-if.tree.json000066400000000000000000000164161331122015500254150ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "IfStatement", "test": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "consequent": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 26, 28 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 28 } } }, "generator": false, "expression": false, "async": true, "range": [ 7, 28 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 28 } } }, "alternate": null, "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } } } ], "sourceType": "script", "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } }, "tokens": [ { "type": "Keyword", "value": "if", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ")", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "async", "range": [ 7, 12 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } } }, { "type": "Keyword", "value": "function", "range": [ 13, 21 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "f", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "(", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": ")", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "{", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "}", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/functions/export-async-function-declaration-await.module.js000066400000000000000000000000471331122015500335330ustar00rootroot00000000000000export async function f(a) { await a } export-async-function-declaration-await.module.tree.json000066400000000000000000000233161331122015500347530ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/functions{ "type": "Program", "body": [ { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "params": [ { "type": "Identifier", "name": "a", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, "range": [ 29, 36 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 36 } } }, "range": [ 29, 37 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 37 } } } ], "range": [ 27, 38 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 38 } } }, "generator": false, "expression": false, "async": true, "range": [ 7, 38 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 38 } } }, "specifiers": [], "source": null, "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } ], "sourceType": "module", "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } }, "tokens": [ { "type": "Keyword", "value": "export", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "async", "range": [ 7, 12 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } } }, { "type": "Keyword", "value": "function", "range": [ 13, 21 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "f", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "(", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Identifier", "value": "a", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ")", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "{", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Identifier", "value": "await", "range": [ 29, 34 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 34 } } }, { "type": "Identifier", "value": "a", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": "}", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/functions/export-async-function-declaration.module.js000066400000000000000000000000351331122015500324250ustar00rootroot00000000000000export async function f() {} export-async-function-declaration.module.tree.json000066400000000000000000000132221331122015500336430ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/functions{ "type": "Program", "body": [ { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 26, 28 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 28 } } }, "generator": false, "expression": false, "async": true, "range": [ 7, 28 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 28 } } }, "specifiers": [], "source": null, "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } } } ], "sourceType": "module", "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } }, "tokens": [ { "type": "Keyword", "value": "export", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "async", "range": [ 7, 12 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } } }, { "type": "Keyword", "value": "function", "range": [ 13, 21 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "f", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "(", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": ")", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "{", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "}", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } } ] }export-default-async-function-declaration.module.js000066400000000000000000000000431331122015500337670ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/functionsexport default async function() {} export-default-async-function-declaration.module.tree.json000066400000000000000000000121141331122015500352640ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/functions{ "type": "Program", "body": [ { "type": "ExportDefaultDeclaration", "declaration": { "type": "FunctionDeclaration", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 32, 34 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 34 } } }, "generator": false, "expression": false, "async": true, "range": [ 15, 34 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 34 } } }, "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } ], "sourceType": "module", "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } }, "tokens": [ { "type": "Keyword", "value": "export", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": "Keyword", "value": "default", "range": [ 7, 14 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "async", "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } }, { "type": "Keyword", "value": "function", "range": [ 21, 29 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "(", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": ")", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "{", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } } ] }export-default-async-named-function-declaration-await.module.js000066400000000000000000000000571331122015500361610ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/functionsexport default async function f(a) { await a } export-default-async-named-function-declaration-await.module.tree.json000066400000000000000000000240651331122015500374610ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/functions{ "type": "Program", "body": [ { "type": "ExportDefaultDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, "params": [ { "type": "Identifier", "name": "a", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 43, 44 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 44 } } }, "range": [ 37, 44 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 44 } } }, "range": [ 37, 45 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 45 } } } ], "range": [ 35, 46 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 46 } } }, "generator": false, "expression": false, "async": true, "range": [ 15, 46 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 46 } } }, "range": [ 0, 46 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 46 } } } ], "sourceType": "module", "range": [ 0, 46 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 46 } }, "tokens": [ { "type": "Keyword", "value": "export", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": "Keyword", "value": "default", "range": [ 7, 14 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "async", "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } }, { "type": "Keyword", "value": "function", "range": [ 21, 29 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 29 } } }, { "type": "Identifier", "value": "f", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "(", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Identifier", "value": "a", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": ")", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "{", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Identifier", "value": "await", "range": [ 37, 42 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 42 } } }, { "type": "Identifier", "value": "a", "range": [ 43, 44 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 44 } } }, { "type": "Punctuator", "value": "}", "range": [ 45, 46 ], "loc": { "start": { "line": 1, "column": 45 }, "end": { "line": 1, "column": 46 } } } ] }export-default-async-named-function-declaration.module.js000066400000000000000000000000451331122015500350530ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/functionsexport default async function f() {} export-default-async-named-function-declaration.module.tree.json000066400000000000000000000137711331122015500363600ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/functions{ "type": "Program", "body": [ { "type": "ExportDefaultDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 34, 36 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 36 } } }, "generator": false, "expression": false, "async": true, "range": [ 15, 36 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 36 } } }, "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } ], "sourceType": "module", "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } }, "tokens": [ { "type": "Keyword", "value": "export", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": "Keyword", "value": "default", "range": [ 7, 14 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "async", "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } }, { "type": "Keyword", "value": "function", "range": [ 21, 29 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 29 } } }, { "type": "Identifier", "value": "f", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "(", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": ")", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "{", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": "}", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/functions/inner-function-async.js000066400000000000000000000000651331122015500264530ustar00rootroot00000000000000(function(x) { async function inner() { await x } }) esprima-4.0.1/test/fixtures/es2017/async/functions/inner-function-async.tree.json000066400000000000000000000350211331122015500277460ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "inner", "range": [ 30, 35 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 35 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "x", "range": [ 46, 47 ], "loc": { "start": { "line": 1, "column": 46 }, "end": { "line": 1, "column": 47 } } }, "range": [ 40, 47 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 47 } } }, "range": [ 40, 48 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 48 } } } ], "range": [ 38, 49 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 49 } } }, "generator": false, "expression": false, "async": true, "range": [ 15, 49 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 49 } } } ], "range": [ 13, 51 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 51 } } }, "generator": false, "expression": false, "async": false, "range": [ 1, 51 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 51 } } }, "range": [ 0, 52 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 52 } } } ], "sourceType": "script", "range": [ 0, 52 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 52 } }, "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "function", "range": [ 1, 9 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "(", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "x", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "async", "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } }, { "type": "Keyword", "value": "function", "range": [ 21, 29 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 29 } } }, { "type": "Identifier", "value": "inner", "range": [ 30, 35 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": "(", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": ")", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": "{", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, { "type": "Identifier", "value": "await", "range": [ 40, 45 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 45 } } }, { "type": "Identifier", "value": "x", "range": [ 46, 47 ], "loc": { "start": { "line": 1, "column": 46 }, "end": { "line": 1, "column": 47 } } }, { "type": "Punctuator", "value": "}", "range": [ 48, 49 ], "loc": { "start": { "line": 1, "column": 48 }, "end": { "line": 1, "column": 49 } } }, { "type": "Punctuator", "value": "}", "range": [ 50, 51 ], "loc": { "start": { "line": 1, "column": 50 }, "end": { "line": 1, "column": 51 } } }, { "type": "Punctuator", "value": ")", "range": [ 51, 52 ], "loc": { "start": { "line": 1, "column": 51 }, "end": { "line": 1, "column": 52 } } } ] }invalid-async-line-terminator-expression.failure.json000066400000000000000000000002041331122015500343460ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/functions{"index":7,"lineNumber":2,"column":1,"message":"Error: Line 2: Unexpected token function","description":"Unexpected token function"}esprima-4.0.1/test/fixtures/es2017/async/functions/invalid-async-line-terminator-expression.js000066400000000000000000000000301331122015500324370ustar00rootroot00000000000000(async function f() {}) esprima-4.0.1/test/fixtures/es2017/async/functions/invalid-async-while.failure.json000066400000000000000000000001761331122015500302370ustar00rootroot00000000000000{"index":6,"lineNumber":1,"column":7,"message":"Error: Line 1: Unexpected token while","description":"Unexpected token while"}esprima-4.0.1/test/fixtures/es2017/async/functions/invalid-async-while.js000066400000000000000000000000231331122015500262430ustar00rootroot00000000000000async while (1) {} invalid-export-async-function-expression.module.failure.json000066400000000000000000000001701331122015500356670ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/functions{"index":21,"lineNumber":1,"column":22,"message":"Error: Line 1: Unexpected token (","description":"Unexpected token ("}invalid-export-async-function-expression.module.js000066400000000000000000000000331331122015500337020ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/functionsexport async function() {} esprima-4.0.1/test/fixtures/es2017/async/functions/invalid-generator-declaration.failure.json000066400000000000000000000001701331122015500322570ustar00rootroot00000000000000{"index":15,"lineNumber":1,"column":16,"message":"Error: Line 1: Unexpected token *","description":"Unexpected token *"}esprima-4.0.1/test/fixtures/es2017/async/functions/invalid-generator-declaration.js000066400000000000000000000000271331122015500302750ustar00rootroot00000000000000async function *f() {} esprima-4.0.1/test/fixtures/es2017/async/functions/invalid-generator-expression.failure.json000066400000000000000000000001701331122015500321710ustar00rootroot00000000000000{"index":19,"lineNumber":1,"column":20,"message":"Error: Line 1: Unexpected token *","description":"Unexpected token *"}esprima-4.0.1/test/fixtures/es2017/async/functions/invalid-generator-expression.js000066400000000000000000000000331331122015500302040ustar00rootroot00000000000000x = async function *f() {} esprima-4.0.1/test/fixtures/es2017/async/invalid-await/000077500000000000000000000000001331122015500225645ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-declaration1.failure.json000066400000000000000000000001761331122015500322060ustar00rootroot00000000000000{"index":25,"lineNumber":1,"column":26,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-declaration1.js000066400000000000000000000000421331122015500302130ustar00rootroot00000000000000async function f() { let await; } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-declaration2.failure.json000066400000000000000000000001761331122015500322070ustar00rootroot00000000000000{"index":28,"lineNumber":1,"column":29,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-declaration2.js000066400000000000000000000000451331122015500302170ustar00rootroot00000000000000a = async function () { let await; } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-declaration3.failure.json000066400000000000000000000001761331122015500322100ustar00rootroot00000000000000{"index":25,"lineNumber":1,"column":26,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-declaration3.js000066400000000000000000000000551331122015500302210ustar00rootroot00000000000000class X { async function f() { let await } } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-declaration4.failure.json000066400000000000000000000001761331122015500322110ustar00rootroot00000000000000{"index":22,"lineNumber":1,"column":23,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-declaration4.js000066400000000000000000000000401331122015500302140ustar00rootroot00000000000000x = { async f() { let await } } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-function-name1.failure.json000066400000000000000000000001761331122015500324640ustar00rootroot00000000000000{"index":36,"lineNumber":1,"column":37,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-function-name1.js000066400000000000000000000000611331122015500304720ustar00rootroot00000000000000async function f() { async function await() {} } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-function-name2.failure.json000066400000000000000000000001761331122015500324650ustar00rootroot00000000000000{"index":39,"lineNumber":1,"column":40,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-function-name2.js000066400000000000000000000000641331122015500304760ustar00rootroot00000000000000a = async function () { async function await() {} } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-identifier1.failure.json000066400000000000000000000001701331122015500320350ustar00rootroot00000000000000{"index":28,"lineNumber":1,"column":29,"message":"Error: Line 1: Unexpected token )","description":"Unexpected token )"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-identifier1.js000066400000000000000000000000401331122015500300460ustar00rootroot00000000000000async function f() { g(await) } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-identifier2.failure.json000066400000000000000000000001701331122015500320360ustar00rootroot00000000000000{"index":30,"lineNumber":1,"column":31,"message":"Error: Line 1: Unexpected token )","description":"Unexpected token )"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-identifier2.js000066400000000000000000000000421331122015500300510ustar00rootroot00000000000000a = async function() { g(await) } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-method.failure.json000066400000000000000000000001661331122015500311170ustar00rootroot00000000000000{"index":7,"lineNumber":1,"column":8,"message":"Error: Line 1: Unexpected token (","description":"Unexpected token ("}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-method.js000066400000000000000000000000521331122015500271260ustar00rootroot00000000000000async f() { class X { async await(){} } } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-no-argument1.failure.json000066400000000000000000000001701331122015500321470ustar00rootroot00000000000000{"index":27,"lineNumber":1,"column":28,"message":"Error: Line 1: Unexpected token }","description":"Unexpected token }"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-no-argument1.js000066400000000000000000000000351331122015500301640ustar00rootroot00000000000000async function f() { await } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-no-argument2.failure.json000066400000000000000000000001701331122015500321500ustar00rootroot00000000000000{"index":29,"lineNumber":1,"column":30,"message":"Error: Line 1: Unexpected token }","description":"Unexpected token }"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-no-argument2.js000066400000000000000000000000371331122015500301670ustar00rootroot00000000000000a = async function() { await } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-object-expression1.failure.json000066400000000000000000000001701331122015500333560ustar00rootroot00000000000000{"index":37,"lineNumber":1,"column":38,"message":"Error: Line 1: Unexpected token }","description":"Unexpected token }"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-object-expression1.js000066400000000000000000000000511331122015500313710ustar00rootroot00000000000000async function f() { return {g: await} } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-object-expression2.failure.json000066400000000000000000000001701331122015500333570ustar00rootroot00000000000000{"index":43,"lineNumber":1,"column":44,"message":"Error: Line 1: Unexpected token }","description":"Unexpected token }"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-object-expression2.js000066400000000000000000000000571331122015500314000ustar00rootroot00000000000000var f = async function() { return {g: await} } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-outside-async.failure.json000066400000000000000000000001761331122015500324270ustar00rootroot00000000000000{"index":22,"lineNumber":1,"column":23,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-outside-async.js000066400000000000000000000000321331122015500304330ustar00rootroot00000000000000function f(x) { await x } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-parameter1.failure.json000066400000000000000000000001761331122015500317010ustar00rootroot00000000000000{"index":17,"lineNumber":1,"column":18,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-parameter1.js000066400000000000000000000000331331122015500277060ustar00rootroot00000000000000async function f(await) {} esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-parameter2.failure.json000066400000000000000000000001761331122015500317020ustar00rootroot00000000000000{"index":19,"lineNumber":1,"column":20,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-parameter2.js000066400000000000000000000000351331122015500277110ustar00rootroot00000000000000a = async function(await) {} esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-parameter3.failure.json000066400000000000000000000001761331122015500317030ustar00rootroot00000000000000{"index":18,"lineNumber":1,"column":19,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-parameter3.js000066400000000000000000000000361331122015500277130ustar00rootroot00000000000000class X { async f(await) {} } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-parameter4.failure.json000066400000000000000000000001761331122015500317040ustar00rootroot00000000000000{"index":25,"lineNumber":1,"column":26,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-parameter4.js000066400000000000000000000000451331122015500277140ustar00rootroot00000000000000class x { static async f(await) {} } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-parameter5.failure.json000066400000000000000000000001761331122015500317050ustar00rootroot00000000000000{"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-parameter5.js000066400000000000000000000000311331122015500277100ustar00rootroot00000000000000x = { async f(await){} } esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-parameter6.failure.json000066400000000000000000000001721331122015500317020ustar00rootroot00000000000000{"index":12,"lineNumber":1,"column":13,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-parameter6.js000066400000000000000000000000221331122015500277110ustar00rootroot00000000000000async await => 42 esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-parameter7.failure.json000066400000000000000000000001721331122015500317030ustar00rootroot00000000000000{"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: Unexpected token =>","description":"Unexpected token =>"}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-parameter7.js000066400000000000000000000000241331122015500277140ustar00rootroot00000000000000async (await) => 42 esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-property.failure.json000066400000000000000000000001661331122015500315230ustar00rootroot00000000000000{"index":7,"lineNumber":1,"column":8,"message":"Error: Line 1: Unexpected token (","description":"Unexpected token ("}esprima-4.0.1/test/fixtures/es2017/async/invalid-await/invalid-await-property.js000066400000000000000000000000461331122015500275350ustar00rootroot00000000000000async f() { x = { async await(){} } } esprima-4.0.1/test/fixtures/es2017/async/methods/000077500000000000000000000000001331122015500214765ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/methods/async-method-await.js000066400000000000000000000000351331122015500255300ustar00rootroot00000000000000({ async f(a) { await a } }) esprima-4.0.1/test/fixtures/es2017/async/methods/async-method-await.tree.json000066400000000000000000000322241331122015500270300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "f", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "range": [ 16, 23 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 23 } } }, "range": [ 16, 24 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 14, 25 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 25 } } }, "generator": false, "expression": false, "async": true, "range": [ 10, 25 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 25 } } }, "kind": "init", "method": true, "shorthand": false, "range": [ 3, 25 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 25 } } } ], "range": [ 1, 27 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 27 } } }, "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } } } ], "sourceType": "script", "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } }, "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "{", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "async", "range": [ 3, 8 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "f", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "a", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ")", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "{", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "await", "range": [ 16, 21 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "a", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "}", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "}", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": ")", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/async-method-computed.js000066400000000000000000000000311331122015500262370ustar00rootroot00000000000000({ async ["xyz"]() {} }) esprima-4.0.1/test/fixtures/es2017/async/methods/async-method-computed.tree.json000066400000000000000000000221351331122015500275430ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Literal", "value": "xyz", "raw": "\"xyz\"", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, "computed": true, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 19, 21 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 21 } } }, "generator": false, "expression": false, "async": true, "range": [ 16, 21 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 21 } } }, "kind": "init", "method": true, "shorthand": false, "range": [ 3, 21 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 1, 23 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 23 } } }, "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } ], "sourceType": "script", "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } }, "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "{", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "async", "range": [ 3, 8 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "[", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "String", "value": "\"xyz\"", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "]", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "(", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ")", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "{", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "}", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "}", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ")", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/async-method-literal.js000066400000000000000000000000271331122015500260600ustar00rootroot00000000000000({ async "xyz"() {} }) esprima-4.0.1/test/fixtures/es2017/async/methods/async-method-literal.tree.json000066400000000000000000000204501331122015500273550ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Literal", "value": "xyz", "raw": "\"xyz\"", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 17, 19 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 19 } } }, "generator": false, "expression": false, "async": true, "range": [ 14, 19 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 19 } } }, "kind": "init", "method": true, "shorthand": false, "range": [ 3, 19 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 19 } } } ], "range": [ 1, 21 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } }, "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "{", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "async", "range": [ 3, 8 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 8 } } }, { "type": "String", "value": "\"xyz\"", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "{", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "}", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "}", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ")", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/async-method-number.js000066400000000000000000000000231331122015500257100ustar00rootroot00000000000000({ async 3() {} }) esprima-4.0.1/test/fixtures/es2017/async/methods/async-method-number.tree.json000066400000000000000000000204311331122015500272100ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Literal", "value": 3, "raw": "3", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, "generator": false, "expression": false, "async": true, "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, "kind": "init", "method": true, "shorthand": false, "range": [ 3, 15 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 1, 17 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } ], "sourceType": "script", "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } }, "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "{", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "async", "range": [ 3, 8 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 8 } } }, { "type": "Numeric", "value": "3", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "}", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "}", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ")", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/async-method.js000066400000000000000000000000231331122015500244220ustar00rootroot00000000000000({ async f() {} }) esprima-4.0.1/test/fixtures/es2017/async/methods/async-method.tree.json000066400000000000000000000203701331122015500257240ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "f", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, "generator": false, "expression": false, "async": true, "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, "kind": "init", "method": true, "shorthand": false, "range": [ 3, 15 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 1, 17 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } ], "sourceType": "script", "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } }, "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "{", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "async", "range": [ 3, 8 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "f", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "}", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "}", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ")", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/class-async-get.js000066400000000000000000000000321331122015500250240ustar00rootroot00000000000000class X { async get(){} } esprima-4.0.1/test/fixtures/es2017/async/methods/class-async-get.tree.json000066400000000000000000000213171331122015500263300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "get", "range": [ 16, 19 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 19 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 21, 23 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 23 } } }, "generator": false, "expression": false, "async": true, "range": [ 19, 23 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 23 } } }, "kind": "method", "static": false, "range": [ 10, 23 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 23 } } } ], "range": [ 8, 25 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 25 } } }, "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } ], "sourceType": "script", "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "async", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "get", "range": [ 16, 19 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "(", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": ")", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "{", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "}", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "}", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/class-async-method-await.js000066400000000000000000000000431331122015500266320ustar00rootroot00000000000000class X { async f(a) { await a } } esprima-4.0.1/test/fixtures/es2017/async/methods/class-async-method-await.tree.json000066400000000000000000000331471331122015500301400ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "f", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, "range": [ 23, 30 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 30 } } }, "range": [ 23, 31 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 21, 32 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 32 } } }, "generator": false, "expression": false, "async": true, "range": [ 17, 32 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 32 } } }, "kind": "method", "static": false, "range": [ 10, 32 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 32 } } } ], "range": [ 8, 34 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 34 } } }, "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } ], "sourceType": "script", "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "async", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "f", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "(", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "a", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ")", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "{", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "await", "range": [ 23, 28 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 28 } } }, { "type": "Identifier", "value": "a", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": "}", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/class-async-method-computed.js000066400000000000000000000000341331122015500273450ustar00rootroot00000000000000class X { async ["f"](){} } esprima-4.0.1/test/fixtures/es2017/async/methods/class-async-method-computed.tree.json000066400000000000000000000230511331122015500306440ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Literal", "value": "f", "raw": "\"f\"", "range": [ 17, 20 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 20 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 23, 25 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 25 } } }, "generator": false, "expression": false, "async": true, "range": [ 21, 25 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 25 } } }, "kind": "method", "static": false, "range": [ 10, 25 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 25 } } } ], "range": [ 8, 27 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 27 } } }, "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } } } ], "sourceType": "script", "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "async", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "[", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "String", "value": "\"f\"", "range": [ 17, 20 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "]", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "(", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "{", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "}", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "}", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/class-async-method-literal.js000066400000000000000000000000321331122015500271570ustar00rootroot00000000000000class X { async "f"(){} } esprima-4.0.1/test/fixtures/es2017/async/methods/class-async-method-literal.tree.json000066400000000000000000000213651331122015500304660ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Literal", "value": "f", "raw": "\"f\"", "range": [ 16, 19 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 19 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 21, 23 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 23 } } }, "generator": false, "expression": false, "async": true, "range": [ 19, 23 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 23 } } }, "kind": "method", "static": false, "range": [ 10, 23 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 23 } } } ], "range": [ 8, 25 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 25 } } }, "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } ], "sourceType": "script", "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "async", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "String", "value": "\"f\"", "range": [ 16, 19 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "(", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": ")", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "{", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "}", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "}", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/class-async-method-number.js000066400000000000000000000000301331122015500270110ustar00rootroot00000000000000class X { async 3(){} } esprima-4.0.1/test/fixtures/es2017/async/methods/class-async-method-number.tree.json000066400000000000000000000213541331122015500303200ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Literal", "value": 3, "raw": "3", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 19, 21 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 21 } } }, "generator": false, "expression": false, "async": true, "range": [ 17, 21 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 21 } } }, "kind": "method", "static": false, "range": [ 10, 21 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 8, 23 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 23 } } }, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "async", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Numeric", "value": "3", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "(", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "{", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "}", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "}", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/class-async-method.js000066400000000000000000000000301331122015500255230ustar00rootroot00000000000000class X { async f(){} } esprima-4.0.1/test/fixtures/es2017/async/methods/class-async-method.tree.json000066400000000000000000000213131331122015500270250ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "f", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 19, 21 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 21 } } }, "generator": false, "expression": false, "async": true, "range": [ 17, 21 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 21 } } }, "kind": "method", "static": false, "range": [ 10, 21 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 8, 23 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 23 } } }, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "async", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "f", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "(", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "{", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "}", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "}", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/class-async-set.js000066400000000000000000000000331331122015500250410ustar00rootroot00000000000000class X { async set(v){} } esprima-4.0.1/test/fixtures/es2017/async/methods/class-async-set.tree.json000066400000000000000000000237161331122015500263510ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "set", "range": [ 16, 19 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 19 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "v", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 22, 24 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 24 } } }, "generator": false, "expression": false, "async": true, "range": [ 19, 24 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 24 } } }, "kind": "method", "static": false, "range": [ 10, 24 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 8, 26 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 26 } } }, "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } ], "sourceType": "script", "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "async", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "set", "range": [ 16, 19 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "(", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "v", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ")", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "{", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "}", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "}", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/class-static-async-get.js000066400000000000000000000000421331122015500263120ustar00rootroot00000000000000class X { static async get() {} } esprima-4.0.1/test/fixtures/es2017/async/methods/class-static-async-get.tree.json000066400000000000000000000221521331122015500276130ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "get", "range": [ 23, 26 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 26 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 29, 31 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 31 } } }, "generator": false, "expression": false, "async": true, "range": [ 26, 31 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 31 } } }, "kind": "method", "static": true, "range": [ 10, 31 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 8, 33 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 33 } } }, "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } } } ], "sourceType": "script", "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "static", "range": [ 10, 16 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "async", "range": [ 17, 22 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "get", "range": [ 23, 26 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "(", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": ")", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "{", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": "}", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "}", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/class-static-async-method-await.js000066400000000000000000000000521331122015500301170ustar00rootroot00000000000000class X { static async f(a) { await a } } esprima-4.0.1/test/fixtures/es2017/async/methods/class-static-async-method-await.tree.json000066400000000000000000000340021331122015500314140ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "f", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AwaitExpression", "argument": { "type": "Identifier", "name": "a", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, "range": [ 30, 37 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 37 } } }, "range": [ 30, 38 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 38 } } } ], "range": [ 28, 39 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 39 } } }, "generator": false, "expression": false, "async": true, "range": [ 24, 39 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 39 } } }, "kind": "method", "static": true, "range": [ 10, 39 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 39 } } } ], "range": [ 8, 41 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 41 } } }, "range": [ 0, 41 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 41 } } } ], "sourceType": "script", "range": [ 0, 41 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 41 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "static", "range": [ 10, 16 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "async", "range": [ 17, 22 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "f", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "(", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Identifier", "value": "a", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": ")", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "{", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Identifier", "value": "await", "range": [ 30, 35 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 35 } } }, { "type": "Identifier", "value": "a", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": "}", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, { "type": "Punctuator", "value": "}", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/class-static-async-method.js000066400000000000000000000000371331122015500270170ustar00rootroot00000000000000class X { static async f(){} } esprima-4.0.1/test/fixtures/es2017/async/methods/class-static-async-method.tree.json000066400000000000000000000221461331122015500303170ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "f", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 26, 28 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 28 } } }, "generator": false, "expression": false, "async": true, "range": [ 24, 28 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 28 } } }, "kind": "method", "static": true, "range": [ 10, 28 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 28 } } } ], "range": [ 8, 30 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 30 } } }, "range": [ 0, 30 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } } } ], "sourceType": "script", "range": [ 0, 30 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "static", "range": [ 10, 16 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "async", "range": [ 17, 22 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "f", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "(", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ")", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "{", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "}", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "}", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/class-static-async-set.js000066400000000000000000000000421331122015500263260ustar00rootroot00000000000000class X { static async set(v){} } esprima-4.0.1/test/fixtures/es2017/async/methods/class-static-async-set.tree.json000066400000000000000000000245511331122015500276340ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "set", "range": [ 23, 26 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 26 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "v", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 29, 31 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 31 } } }, "generator": false, "expression": false, "async": true, "range": [ 26, 31 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 31 } } }, "kind": "method", "static": true, "range": [ 10, 31 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 8, 33 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 33 } } }, "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } } } ], "sourceType": "script", "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "static", "range": [ 10, 16 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "async", "range": [ 17, 22 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "set", "range": [ 23, 26 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "(", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Identifier", "value": "v", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": ")", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "{", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": "}", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "}", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-class-constructor.failure.json000066400000000000000000000002541331122015500322470ustar00rootroot00000000000000{"index":16,"lineNumber":1,"column":17,"message":"Error: Line 1: Class constructor may not be an async method","description":"Class constructor may not be an async method"}esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-class-constructor.js000066400000000000000000000000421331122015500302570ustar00rootroot00000000000000class X { async constructor(){} } esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-class-generator.failure.json000066400000000000000000000001701331122015500316450ustar00rootroot00000000000000{"index":16,"lineNumber":1,"column":17,"message":"Error: Line 1: Unexpected token *","description":"Unexpected token *"}esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-class-generator.js000066400000000000000000000000321331122015500276570ustar00rootroot00000000000000class X { async *g() {} } esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-generator.failure.json000066400000000000000000000001701331122015500305420ustar00rootroot00000000000000{"index":12,"lineNumber":1,"column":13,"message":"Error: Line 1: Unexpected token *","description":"Unexpected token *"}esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-generator.js000066400000000000000000000000261331122015500265570ustar00rootroot00000000000000x = { async *g() {} } esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-getter.failure.json000066400000000000000000000001761331122015500300540ustar00rootroot00000000000000{"index":16,"lineNumber":1,"column":17,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-getter.js000066400000000000000000000000311331122015500260570ustar00rootroot00000000000000x = { async get g() {} } esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-line-terminator-method.failure.json000066400000000000000000000001761331122015500331510ustar00rootroot00000000000000{"index":16,"lineNumber":2,"column":17,"message":"Error: Line 2: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-line-terminator-method.js000066400000000000000000000000301331122015500311530ustar00rootroot00000000000000class X { async f(){} } esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-line-terminator-property.failure.json000066400000000000000000000001751331122015500335540ustar00rootroot00000000000000{"index":12,"lineNumber":2,"column":1,"message":"Error: Line 2: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-line-terminator-property.js000066400000000000000000000000241331122015500315620ustar00rootroot00000000000000x = { async f(){} } invalid-async-line-terminator-static-method.failure.json000066400000000000000000000001761331122015500343570ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/methods{"index":23,"lineNumber":2,"column":24,"message":"Error: Line 2: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-line-terminator-static-method.js000066400000000000000000000000371331122015500324470ustar00rootroot00000000000000class X { static async f(){} } esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-method.failure.json000066400000000000000000000001701331122015500300340ustar00rootroot00000000000000{"index":13,"lineNumber":1,"column":14,"message":"Error: Line 1: Unexpected token :","description":"Unexpected token :"}esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-method.js000066400000000000000000000000371331122015500260530ustar00rootroot00000000000000x = { async f: function() {} } esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-setter.failure.json000066400000000000000000000001761331122015500300700ustar00rootroot00000000000000{"index":15,"lineNumber":1,"column":16,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-setter.js000066400000000000000000000000311331122015500260730ustar00rootroot00000000000000x = {async set s(i) {} } esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-static.failure.json000066400000000000000000000001761331122015500300510ustar00rootroot00000000000000{"index":23,"lineNumber":1,"column":24,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-async-static.js000066400000000000000000000000401331122015500260540ustar00rootroot00000000000000class X { async static f() {} } esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-static-async-class-generator.failure.json000066400000000000000000000001701331122015500331320ustar00rootroot00000000000000{"index":23,"lineNumber":1,"column":24,"message":"Error: Line 1: Unexpected token *","description":"Unexpected token *"}esprima-4.0.1/test/fixtures/es2017/async/methods/invalid-static-async-class-generator.js000066400000000000000000000000401331122015500311430ustar00rootroot00000000000000class X { static async *g(){} } esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/000077500000000000000000000000001331122015500236145ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/argument-async-call.js000066400000000000000000000000221331122015500300120ustar00rootroot00000000000000f(x, async(y, z)) esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/argument-async-call.tree.json000066400000000000000000000231051331122015500313140ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "arguments": [ { "type": "Identifier", "name": "x", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "CallExpression", "callee": { "type": "Identifier", "name": "async", "range": [ 5, 10 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 10 } } }, "arguments": [ { "type": "Identifier", "name": "y", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "name": "z", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 5, 16 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } ], "sourceType": "script", "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } }, "tokens": [ { "type": "Identifier", "value": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "(", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "x", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": ",", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "async", "range": [ 5, 10 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "y", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ",", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "z", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/async-arrow-parameter1.js000066400000000000000000000000151331122015500304520ustar00rootroot00000000000000async => 42; esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/async-arrow-parameter1.tree.json000066400000000000000000000101541331122015500317520ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "body": { "type": "Literal", "value": 42, "raw": "42", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } }, "generator": false, "expression": true, "async": false, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } } ], "sourceType": "script", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=>", "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } }, { "type": "Numeric", "value": "42", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ";", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/async-arrow-parameter2.js000066400000000000000000000000341331122015500304540ustar00rootroot00000000000000const answer = async => 42; esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/async-arrow-parameter2.tree.json000066400000000000000000000157671331122015500317720ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "answer", "range": [ 6, 12 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 12 } } }, "init": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "async", "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } } ], "body": { "type": "Literal", "value": 42, "raw": "42", "range": [ 24, 26 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 26 } } }, "generator": false, "expression": true, "async": false, "range": [ 15, 26 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 26 } } }, "range": [ 6, 26 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 26 } } } ], "kind": "const", "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } } } ], "sourceType": "script", "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } }, "tokens": [ { "type": "Keyword", "value": "const", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "answer", "range": [ 6, 12 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "=", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "async", "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "=>", "range": [ 21, 23 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 23 } } }, { "type": "Numeric", "value": "42", "range": [ 24, 26 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": ";", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/await-function-name.js000066400000000000000000000000321331122015500300130ustar00rootroot00000000000000async function await() {} esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/await-function-name.tree.json000066400000000000000000000111071331122015500313130ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "await", "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 23, 25 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 25 } } }, "generator": false, "expression": false, "async": true, "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } ], "sourceType": "script", "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "function", "range": [ 6, 14 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "await", "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "(", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ")", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "{", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "}", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/await-method-name.js000066400000000000000000000000341331122015500274500ustar00rootroot00000000000000class X { async await(){} } esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/await-method-name.tree.json000066400000000000000000000213231331122015500307470ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "await", "range": [ 16, 21 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 21 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 23, 25 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 25 } } }, "generator": false, "expression": false, "async": true, "range": [ 21, 25 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 25 } } }, "kind": "method", "static": false, "range": [ 10, 25 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 25 } } } ], "range": [ 8, 27 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 27 } } }, "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } } } ], "sourceType": "script", "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "async", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "await", "range": [ 16, 21 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "(", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "{", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "}", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "}", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/await-static-name.js000066400000000000000000000000431331122015500274570ustar00rootroot00000000000000class X { static async await(){} } esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/await-static-name.tree.json000066400000000000000000000221561331122015500307630ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "await", "range": [ 23, 28 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 28 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 30, 32 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 32 } } }, "generator": false, "expression": false, "async": true, "range": [ 28, 32 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 32 } } }, "kind": "method", "static": true, "range": [ 10, 32 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 32 } } } ], "range": [ 8, 34 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 34 } } }, "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } ], "sourceType": "script", "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "static", "range": [ 10, 16 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "async", "range": [ 17, 22 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "await", "range": [ 23, 28 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "(", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": ")", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": "{", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "}", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/call-async-await.js000066400000000000000000000000221331122015500272750ustar00rootroot00000000000000a = async(await); esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/call-async-await.tree.json000066400000000000000000000146321331122015500306040ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "a", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "async", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, "arguments": [ { "type": "Identifier", "name": "await", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 4, 16 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 16 } } }, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } ], "sourceType": "script", "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } }, "tokens": [ { "type": "Identifier", "value": "a", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "async", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "(", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "await", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ";", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/call-async.js000066400000000000000000000000161331122015500261750ustar00rootroot00000000000000x = async(y); esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/call-async.tree.json000066400000000000000000000146221331122015500275000ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "async", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, "arguments": [ { "type": "Identifier", "name": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 4, 12 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 12 } } }, "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } ], "sourceType": "script", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } }, "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "async", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "(", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/export-identifier-async.module.js000066400000000000000000000000251331122015500322070ustar00rootroot00000000000000export var async = 4 esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/export-identifier-async.module.tree.json000066400000000000000000000124421331122015500335100ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExportNamedDeclaration", "declaration": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "async", "range": [ 11, 16 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 16 } } }, "init": { "type": "Literal", "value": 4, "raw": "4", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, "range": [ 11, 20 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 20 } } } ], "kind": "var", "range": [ 7, 20 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 20 } } }, "specifiers": [], "source": null, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } ], "sourceType": "module", "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } }, "tokens": [ { "type": "Keyword", "value": "export", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": "Keyword", "value": "var", "range": [ 7, 10 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "async", "range": [ 11, 16 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "=", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Numeric", "value": "4", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/expr-async.js000066400000000000000000000000311331122015500262350ustar00rootroot00000000000000a = async function f(){} esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/expr-async.tree.json000066400000000000000000000165101331122015500275410ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "a", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "async", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 19, 20 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 10 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 22, 24 ], "loc": { "start": { "line": 2, "column": 12 }, "end": { "line": 2, "column": 14 } } }, "generator": false, "expression": false, "async": false, "range": [ 10, 24 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 14 } } } ], "sourceType": "script", "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 14 } }, "tokens": [ { "type": "Identifier", "value": "a", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "async", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "function", "range": [ 10, 18 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 8 } } }, { "type": "Identifier", "value": "f", "range": [ 19, 20 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 20, 21 ], "loc": { "start": { "line": 2, "column": 10 }, "end": { "line": 2, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 21, 22 ], "loc": { "start": { "line": 2, "column": 11 }, "end": { "line": 2, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 22, 23 ], "loc": { "start": { "line": 2, "column": 12 }, "end": { "line": 2, "column": 13 } } }, { "type": "Punctuator", "value": "}", "range": [ 23, 24 ], "loc": { "start": { "line": 2, "column": 13 }, "end": { "line": 2, "column": 14 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/generator-name-async.js000066400000000000000000000000301331122015500301620ustar00rootroot00000000000000class A { *async() {} } esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/generator-name-async.tree.json000066400000000000000000000213171331122015500314700ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "A", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "async", "range": [ 11, 16 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 16 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 19, 21 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 21 } } }, "generator": true, "expression": false, "async": false, "range": [ 16, 21 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 21 } } }, "kind": "method", "static": false, "range": [ 10, 21 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 8, 23 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 23 } } }, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "A", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "*", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "async", "range": [ 11, 16 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "(", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ")", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "{", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "}", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "}", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/identifier-async.js000066400000000000000000000000261331122015500274050ustar00rootroot00000000000000var async; async = 3; esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/identifier-async.tree.json000066400000000000000000000153431331122015500307100ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "async", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, "init": null, "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } } ], "kind": "var", "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "async", "range": [ 11, 16 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 16 } } }, "right": { "type": "Literal", "value": 3, "raw": "3", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, "range": [ 11, 20 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 20 } } }, "range": [ 11, 21 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 21 } } } ], "sourceType": "script", "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } }, "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "async", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ";", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "async", "range": [ 11, 16 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "=", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Numeric", "value": "3", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": ";", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/label-async.js000066400000000000000000000000271331122015500263430ustar00rootroot00000000000000async: function f() {} esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/label-async.tree.json000066400000000000000000000140601331122015500276400ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "LabeledStatement", "label": { "type": "Identifier", "name": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "body": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 20, 22 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 22 } } }, "generator": false, "expression": false, "async": false, "range": [ 7, 22 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ":", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Keyword", "value": "function", "range": [ 7, 15 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "f", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "(", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "{", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "}", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/line-terminator-arrow.js000066400000000000000000000000151331122015500304070ustar00rootroot00000000000000async x => x esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/line-terminator-arrow.tree.json000066400000000000000000000116721331122015500317150ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 1 } } } ], "body": { "type": "Identifier", "name": "x", "range": [ 11, 12 ], "loc": { "start": { "line": 2, "column": 5 }, "end": { "line": 2, "column": 6 } } }, "generator": false, "expression": true, "async": false, "range": [ 6, 12 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 6 } } }, "range": [ 6, 12 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 6 } } } ], "sourceType": "script", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 6 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 1 } } }, { "type": "Punctuator", "value": "=>", "range": [ 8, 10 ], "loc": { "start": { "line": 2, "column": 2 }, "end": { "line": 2, "column": 4 } } }, { "type": "Identifier", "value": "x", "range": [ 11, 12 ], "loc": { "start": { "line": 2, "column": 5 }, "end": { "line": 2, "column": 6 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/line-terminator-async.js000066400000000000000000000000261331122015500303740ustar00rootroot00000000000000async function f() {} esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/line-terminator-async.tree.json000066400000000000000000000126611331122015500316770ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 15, 16 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 10 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 19, 21 ], "loc": { "start": { "line": 2, "column": 13 }, "end": { "line": 2, "column": 15 } } }, "generator": false, "expression": false, "async": false, "range": [ 6, 21 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 15 } } } ], "sourceType": "script", "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 15 } }, "tokens": [ { "type": "Identifier", "value": "async", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "function", "range": [ 6, 14 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 8 } } }, { "type": "Identifier", "value": "f", "range": [ 15, 16 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 16, 17 ], "loc": { "start": { "line": 2, "column": 10 }, "end": { "line": 2, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 17, 18 ], "loc": { "start": { "line": 2, "column": 11 }, "end": { "line": 2, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 19, 20 ], "loc": { "start": { "line": 2, "column": 13 }, "end": { "line": 2, "column": 14 } } }, { "type": "Punctuator", "value": "}", "range": [ 20, 21 ], "loc": { "start": { "line": 2, "column": 14 }, "end": { "line": 2, "column": 15 } } } ] }line-terminator-parenthesized-arrow.failure.json000066400000000000000000000001711331122015500351610ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/regular-identifier{"index":10,"lineNumber":2,"column":5,"message":"Error: Line 2: Unexpected token =>","description":"Unexpected token =>"}esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/line-terminator-parenthesized-arrow.js000066400000000000000000000000171331122015500332540ustar00rootroot00000000000000async (x) => x esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/method-name-async.js000066400000000000000000000000271331122015500274620ustar00rootroot00000000000000class X { async() {} } esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/method-name-async.tree.json000066400000000000000000000204661331122015500307660ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "async", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 18, 20 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 20 } } }, "generator": false, "expression": false, "async": false, "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } }, "kind": "method", "static": false, "range": [ 10, 20 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 20 } } } ], "range": [ 8, 22 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "async", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "(", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "}", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "}", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/property-async.js000066400000000000000000000000251331122015500271460ustar00rootroot00000000000000x = { async: false } esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/property-async.tree.json000066400000000000000000000167521331122015500304570ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "async", "range": [ 6, 11 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 11 } } }, "computed": false, "value": { "type": "Literal", "value": false, "raw": "false", "range": [ 13, 18 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 18 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 6, 18 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 18 } } } ], "range": [ 4, 20 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 20 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } ], "sourceType": "script", "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } }, "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "async", "range": [ 6, 11 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ":", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Boolean", "value": "false", "range": [ 13, 18 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "}", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/proto-identifier-shorthand-with-async.js000066400000000000000000000000271331122015500335100ustar00rootroot00000000000000({ async, __proto__ }) proto-identifier-shorthand-with-async.tree.json000066400000000000000000000203521331122015500347270ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/async/regular-identifier{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "async", "range": [ 3, 8 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 8 } } }, "computed": false, "value": { "type": "Identifier", "name": "async", "range": [ 3, 8 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 8 } } }, "kind": "init", "method": false, "shorthand": true, "range": [ 3, 8 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 8 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "__proto__", "range": [ 10, 19 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 19 } } }, "computed": false, "value": { "type": "Identifier", "name": "__proto__", "range": [ 10, 19 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 19 } } }, "kind": "init", "method": false, "shorthand": true, "range": [ 10, 19 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 19 } } } ], "range": [ 1, 21 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "{", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "async", "range": [ 3, 8 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ",", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "__proto__", "range": [ 10, 19 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "}", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ")", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ], "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/static-generator-name-async.js000066400000000000000000000000371331122015500314560ustar00rootroot00000000000000class X { static *async() {} } esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/static-generator-name-async.tree.json000066400000000000000000000221521331122015500327530ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "async", "range": [ 18, 23 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 23 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 26, 28 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 28 } } }, "generator": true, "expression": false, "async": false, "range": [ 23, 28 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 28 } } }, "kind": "method", "static": true, "range": [ 10, 28 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 28 } } } ], "range": [ 8, 30 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 30 } } }, "range": [ 0, 30 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } } } ], "sourceType": "script", "range": [ 0, 30 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "static", "range": [ 10, 16 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "*", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "async", "range": [ 18, 23 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "(", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": ")", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "{", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "}", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "}", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } } ] }esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/static-name-async.js000066400000000000000000000000361331122015500274710ustar00rootroot00000000000000class X { static async() {} } esprima-4.0.1/test/fixtures/es2017/async/regular-identifier/static-name-async.tree.json000066400000000000000000000213211331122015500307640ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "async", "range": [ 17, 22 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 22 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 25, 27 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 27 } } }, "generator": false, "expression": false, "async": false, "range": [ 22, 27 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 27 } } }, "kind": "method", "static": true, "range": [ 10, 27 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 27 } } } ], "range": [ 8, 29 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 29 } } }, "range": [ 0, 29 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 29 } } } ], "sourceType": "script", "range": [ 0, 29 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 29 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "static", "range": [ 10, 16 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "async", "range": [ 17, 22 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "(", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ")", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "{", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "}", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "}", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } } ] }esprima-4.0.1/test/fixtures/es2017/for-statement/000077500000000000000000000000001331122015500215065ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/for-statement/invalid-var-init-forin1.failure.json000066400000000000000000000003141331122015500303760ustar00rootroot00000000000000{"index":26,"lineNumber":1,"column":27,"message":"Error: Line 1: for-in loop variable declaration may not have an initializer","description":"for-in loop variable declaration may not have an initializer"}esprima-4.0.1/test/fixtures/es2017/for-statement/invalid-var-init-forin1.js000066400000000000000000000000421331122015500264110ustar00rootroot00000000000000"use strict"; for (var i=0 in j); esprima-4.0.1/test/fixtures/es2017/for-statement/invalid-var-init-forin2.failure.json000066400000000000000000000003141331122015500303770ustar00rootroot00000000000000{"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: for-in loop variable declaration may not have an initializer","description":"for-in loop variable declaration may not have an initializer"}esprima-4.0.1/test/fixtures/es2017/for-statement/invalid-var-init-forin2.js000066400000000000000000000000261331122015500264140ustar00rootroot00000000000000for (var {x}=0 in y); esprima-4.0.1/test/fixtures/es2017/for-statement/invalid-var-init-forin3.failure.json000066400000000000000000000003141331122015500304000ustar00rootroot00000000000000{"index":28,"lineNumber":1,"column":29,"message":"Error: Line 1: for-in loop variable declaration may not have an initializer","description":"for-in loop variable declaration may not have an initializer"}esprima-4.0.1/test/fixtures/es2017/for-statement/invalid-var-init-forin3.js000066400000000000000000000000441331122015500264150ustar00rootroot00000000000000"use strict"; for (var {x}=0 in y); esprima-4.0.1/test/fixtures/es2017/for-statement/invalid-var-init-forin4.failure.json000066400000000000000000000003141331122015500304010ustar00rootroot00000000000000{"index":14,"lineNumber":1,"column":15,"message":"Error: Line 1: for-in loop variable declaration may not have an initializer","description":"for-in loop variable declaration may not have an initializer"}esprima-4.0.1/test/fixtures/es2017/for-statement/invalid-var-init-forin4.js000066400000000000000000000000261331122015500264160ustar00rootroot00000000000000for (var [p]=0 in q); esprima-4.0.1/test/fixtures/es2017/for-statement/invalid-var-init-forin5.failure.json000066400000000000000000000003141331122015500304020ustar00rootroot00000000000000{"index":28,"lineNumber":1,"column":29,"message":"Error: Line 1: for-in loop variable declaration may not have an initializer","description":"for-in loop variable declaration may not have an initializer"}esprima-4.0.1/test/fixtures/es2017/for-statement/invalid-var-init-forin5.js000066400000000000000000000000441331122015500264170ustar00rootroot00000000000000"use strict"; for (var [p]=1 in q); esprima-4.0.1/test/fixtures/es2017/trailing-commas/000077500000000000000000000000001331122015500220045ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-empty-arrow.failure.json000066400000000000000000000001661331122015500302420ustar00rootroot00000000000000{"index":1,"lineNumber":1,"column":2,"message":"Error: Line 1: Unexpected token ,","description":"Unexpected token ,"}esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-empty-arrow.js000066400000000000000000000000121331122015500262450ustar00rootroot00000000000000(,) => 0; esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-empty-call.failure.json000066400000000000000000000001661331122015500300230ustar00rootroot00000000000000{"index":2,"lineNumber":1,"column":3,"message":"Error: Line 1: Unexpected token ,","description":"Unexpected token ,"}esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-empty-call.js000066400000000000000000000000061331122015500260310ustar00rootroot00000000000000f(,); esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-empty-constructor.failure.json000066400000000000000000000001701331122015500314700ustar00rootroot00000000000000{"index":22,"lineNumber":1,"column":23,"message":"Error: Line 1: Unexpected token ,","description":"Unexpected token ,"}esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-empty-constructor.js000066400000000000000000000000361331122015500275060ustar00rootroot00000000000000class A { constructor(,) {} } esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-empty-method.failure.json000066400000000000000000000001701331122015500303630ustar00rootroot00000000000000{"index":12,"lineNumber":1,"column":13,"message":"Error: Line 1: Unexpected token ,","description":"Unexpected token ,"}esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-empty-method.js000066400000000000000000000000231331122015500263750ustar00rootroot00000000000000class A { f(,){} } esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-empty-parameters.failure.json000066400000000000000000000001701331122015500312460ustar00rootroot00000000000000{"index":11,"lineNumber":1,"column":12,"message":"Error: Line 1: Unexpected token ,","description":"Unexpected token ,"}esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-empty-parameters.js000066400000000000000000000000201331122015500272550ustar00rootroot00000000000000function f(,){} esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-rest.failure.json000066400000000000000000000002541331122015500267270ustar00rootroot00000000000000{"index":15,"lineNumber":1,"column":16,"message":"Error: Line 1: Rest parameter must be last formal parameter","description":"Rest parameter must be last formal parameter"}esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-rest.js000066400000000000000000000000251331122015500247400ustar00rootroot00000000000000function f(...a,) {} esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-sequence.failure.json000066400000000000000000000001661331122015500275640ustar00rootroot00000000000000{"index":6,"lineNumber":1,"column":7,"message":"Error: Line 1: Unexpected token ;","description":"Unexpected token ;"}esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-sequence.js000066400000000000000000000000101331122015500255650ustar00rootroot00000000000000(x,y,); esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-trailing-comma-getter.failure.json000066400000000000000000000001701331122015500321420ustar00rootroot00000000000000{"index":16,"lineNumber":1,"column":17,"message":"Error: Line 1: Unexpected token ,","description":"Unexpected token ,"}esprima-4.0.1/test/fixtures/es2017/trailing-commas/invalid-trailing-comma-getter.js000066400000000000000000000000431331122015500301560ustar00rootroot00000000000000class A { get x(,) { return 42 } } esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-arrow-multi.js000066400000000000000000000000161331122015500275220ustar00rootroot00000000000000(x,y,z,) => 0 esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-arrow-multi.tree.json000066400000000000000000000173011331122015500310220ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "name": "y", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "name": "z", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } } ], "body": { "type": "Literal", "value": 0, "raw": "0", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, "generator": false, "expression": true, "async": false, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } ], "sourceType": "script", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } }, "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Identifier", "value": "x", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": ",", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": ",", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "z", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": ",", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ")", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "=>", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } }, { "type": "Numeric", "value": "0", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } } ] }esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-arrow-single.js000066400000000000000000000000121331122015500276450ustar00rootroot00000000000000(x,) => 0 esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-arrow-single.tree.json000066400000000000000000000115771331122015500311620ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } } ], "body": { "type": "Literal", "value": 0, "raw": "0", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "generator": false, "expression": true, "async": false, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } }, "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Identifier", "value": "x", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": ",", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": ")", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "=>", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } }, { "type": "Numeric", "value": "0", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ] }esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-arrow.js000066400000000000000000000000251331122015500263720ustar00rootroot00000000000000let f = (x,y,) => x; esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-arrow.tree.json000066400000000000000000000232561331122015500277000ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "f", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "ArrowFunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "name": "y", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } } ], "body": { "type": "Identifier", "name": "x", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, "generator": false, "expression": true, "async": false, "range": [ 8, 19 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 19 } } }, "range": [ 4, 19 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 19 } } } ], "kind": "let", "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } ], "sourceType": "script", "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } }, "tokens": [ { "type": "Keyword", "value": "let", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "f", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "(", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "x", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ",", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "y", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ",", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "=>", "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "x", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ";", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } } ] }esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-call.js000066400000000000000000000000071331122015500261530ustar00rootroot00000000000000f(x,); esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-call.tree.json000066400000000000000000000113351331122015500274540ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "arguments": [ { "type": "Identifier", "name": "x", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } }, "tokens": [ { "type": "Identifier", "value": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "(", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "x", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": ",", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": ")", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ";", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } } ] }esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-constructor.js000066400000000000000000000000371331122015500276300ustar00rootroot00000000000000class X { constructor(a,) {} } esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-constructor.tree.json000066400000000000000000000237401331122015500311310ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "constructor", "range": [ 10, 21 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 21 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 26, 28 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 28 } } }, "generator": false, "expression": false, "async": false, "range": [ 21, 28 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 28 } } }, "kind": "constructor", "static": false, "range": [ 10, 28 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 28 } } } ], "range": [ 8, 30 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 30 } } }, "range": [ 0, 30 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } } } ], "sourceType": "script", "range": [ 0, 30 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "X", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "constructor", "range": [ 10, 21 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "(", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "a", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ",", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": ")", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "{", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "}", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "}", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } } ] }esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-export-function.js000066400000000000000000000000321331122015500304020ustar00rootroot00000000000000export function f(a,b,){} esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-export-function.tree.json000066400000000000000000000201171331122015500317030ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExportNamedDeclaration", "declaration": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "params": [ { "type": "Identifier", "name": "a", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "name": "b", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 23, 25 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 25 } } }, "generator": false, "expression": false, "async": false, "range": [ 7, 25 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 25 } } }, "specifiers": [], "source": null, "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } ], "sourceType": "module", "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } }, "tokens": [ { "type": "Keyword", "value": "export", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": "Keyword", "value": "function", "range": [ 7, 15 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "f", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "(", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "a", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ",", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "b", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ",", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "{", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "}", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ] }esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-function-declaration.js000066400000000000000000000000231331122015500313460ustar00rootroot00000000000000function f(a,b,){} esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-function-declaration.tree.json000066400000000000000000000155461331122015500326610ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "params": [ { "type": "Identifier", "name": "a", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "name": "b", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 16, 18 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 18 } } }, "generator": false, "expression": false, "async": false, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } ], "sourceType": "script", "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } }, "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "f", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "a", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ",", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "b", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ",", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "{", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "}", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } } ] }esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-function-expression.js000066400000000000000000000000351331122015500312630ustar00rootroot00000000000000const f = function(a, b,) {} esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-function-expression.tree.json000066400000000000000000000232761331122015500325720ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "f", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "init": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "name": "b", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 26, 28 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 28 } } }, "generator": false, "expression": false, "async": false, "range": [ 10, 28 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 28 } } }, "range": [ 6, 28 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 28 } } } ], "kind": "const", "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } } } ], "sourceType": "script", "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } }, "tokens": [ { "type": "Keyword", "value": "const", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "f", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "=", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "function", "range": [ 10, 18 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "(", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "value": "a", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": ",", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "b", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ",", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": ")", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "{", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "}", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } } ] }esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-method.js000066400000000000000000000000301331122015500265140ustar00rootroot00000000000000class P { f(a,b,) { } } esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-method.tree.json000066400000000000000000000271041331122015500300220ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ClassDeclaration", "id": { "type": "Identifier", "name": "P", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "superClass": null, "body": { "type": "ClassBody", "body": [ { "type": "MethodDefinition", "key": { "type": "Identifier", "name": "f", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "name": "b", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 18, 21 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 21 } } }, "generator": false, "expression": false, "async": false, "range": [ 11, 21 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 21 } } }, "kind": "method", "static": false, "range": [ 10, 21 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 8, 23 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 23 } } }, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } }, "tokens": [ { "type": "Keyword", "value": "class", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "P", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "f", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "(", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "a", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ",", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "b", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ",", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "}", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "}", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ] }esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-new.js000066400000000000000000000000131331122015500260260ustar00rootroot00000000000000new f(x,); esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-new.tree.json000066400000000000000000000121671331122015500273360ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "f", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "arguments": [ { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } } ], "sourceType": "script", "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } }, "tokens": [ { "type": "Keyword", "value": "new", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "f", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ",", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ";", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } } ] }esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-spread.js000066400000000000000000000000121331122015500265120ustar00rootroot00000000000000f(...a,); esprima-4.0.1/test/fixtures/es2017/trailing-commas/trailing-comma-spread.tree.json000066400000000000000000000134241331122015500300200ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "arguments": [ { "type": "SpreadElement", "argument": { "type": "Identifier", "name": "a", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 2, 6 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } }, "tokens": [ { "type": "Identifier", "value": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "(", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "...", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "a", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": ",", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ")", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ";", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ] }esprima-4.0.1/test/fixtures/expression/000077500000000000000000000000001331122015500201745ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/additive/000077500000000000000000000000001331122015500217655ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/additive/migrated_0000.js000066400000000000000000000000051331122015500245510ustar00rootroot00000000000000x + yesprima-4.0.1/test/fixtures/expression/additive/migrated_0000.tree.json000066400000000000000000000067151331122015500260620ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "+", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/expression/additive/migrated_0001.js000066400000000000000000000000051331122015500245520ustar00rootroot00000000000000x - yesprima-4.0.1/test/fixtures/expression/additive/migrated_0001.tree.json000066400000000000000000000067151331122015500260630ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "-", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "-", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/expression/additive/migrated_0002.js000066400000000000000000000000211331122015500245510ustar00rootroot00000000000000"use strict" + 42esprima-4.0.1/test/fixtures/expression/additive/migrated_0002.tree.json000066400000000000000000000070741331122015500260630ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "+", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Numeric", "value": "42", "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } } } ], "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } esprima-4.0.1/test/fixtures/expression/assignment/000077500000000000000000000000001331122015500223445ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/assignment/migrated_0000.js000066400000000000000000000000061331122015500251310ustar00rootroot00000000000000x = 42esprima-4.0.1/test/fixtures/expression/assignment/migrated_0000.tree.json000066400000000000000000000067551331122015500264450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 4, 6 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Numeric", "value": "42", "range": [ 4, 6 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/assignment/migrated_0001.js000066400000000000000000000000111331122015500251260ustar00rootroot00000000000000eval = 42esprima-4.0.1/test/fixtures/expression/assignment/migrated_0001.tree.json000066400000000000000000000067631331122015500264450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "eval", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "eval", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "=", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Numeric", "value": "42", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/assignment/migrated_0002.js000066400000000000000000000000161331122015500251340ustar00rootroot00000000000000arguments = 42esprima-4.0.1/test/fixtures/expression/assignment/migrated_0002.tree.json000066400000000000000000000070171331122015500264370ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "arguments", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 12, 14 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 14 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "arguments", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "=", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Numeric", "value": "42", "range": [ 12, 14 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } esprima-4.0.1/test/fixtures/expression/assignment/migrated_0003.js000066400000000000000000000000071331122015500251350ustar00rootroot00000000000000x *= 42esprima-4.0.1/test/fixtures/expression/assignment/migrated_0003.tree.json000066400000000000000000000067571331122015500264520ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "*=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "*=", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Numeric", "value": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/assignment/migrated_0004.js000066400000000000000000000000071331122015500251360ustar00rootroot00000000000000x /= 42esprima-4.0.1/test/fixtures/expression/assignment/migrated_0004.tree.json000066400000000000000000000067571331122015500264530ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "/=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "/=", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Numeric", "value": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/assignment/migrated_0005.js000066400000000000000000000000071331122015500251370ustar00rootroot00000000000000x %= 42esprima-4.0.1/test/fixtures/expression/assignment/migrated_0005.tree.json000066400000000000000000000067571331122015500264540ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "%=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "%=", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Numeric", "value": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/assignment/migrated_0006.js000066400000000000000000000000071331122015500251400ustar00rootroot00000000000000x += 42esprima-4.0.1/test/fixtures/expression/assignment/migrated_0006.tree.json000066400000000000000000000067571331122015500264550ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "+=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "+=", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Numeric", "value": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/assignment/migrated_0007.js000066400000000000000000000000071331122015500251410ustar00rootroot00000000000000x -= 42esprima-4.0.1/test/fixtures/expression/assignment/migrated_0007.tree.json000066400000000000000000000067571331122015500264560ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "-=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "-=", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Numeric", "value": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/assignment/migrated_0008.js000066400000000000000000000000101331122015500251340ustar00rootroot00000000000000x <<= 42esprima-4.0.1/test/fixtures/expression/assignment/migrated_0008.tree.json000066400000000000000000000067611331122015500264520ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "<<=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } }, "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "<<=", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, { "type": "Numeric", "value": "42", "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } } ], "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } esprima-4.0.1/test/fixtures/expression/assignment/migrated_0009.js000066400000000000000000000000101331122015500251350ustar00rootroot00000000000000x >>= 42esprima-4.0.1/test/fixtures/expression/assignment/migrated_0009.tree.json000066400000000000000000000067611331122015500264530ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": ">>=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } }, "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": ">>=", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, { "type": "Numeric", "value": "42", "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } } ], "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } esprima-4.0.1/test/fixtures/expression/assignment/migrated_0010.js000066400000000000000000000000111331122015500251260ustar00rootroot00000000000000x >>>= 42esprima-4.0.1/test/fixtures/expression/assignment/migrated_0010.tree.json000066400000000000000000000067631331122015500264450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": ">>>=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": ">>>=", "range": [ 2, 6 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 6 } } }, { "type": "Numeric", "value": "42", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/assignment/migrated_0011.js000066400000000000000000000000071331122015500251340ustar00rootroot00000000000000x &= 42esprima-4.0.1/test/fixtures/expression/assignment/migrated_0011.tree.json000066400000000000000000000067571331122015500264510ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "&=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "&=", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Numeric", "value": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/assignment/migrated_0012.js000066400000000000000000000000071331122015500251350ustar00rootroot00000000000000x ^= 42esprima-4.0.1/test/fixtures/expression/assignment/migrated_0012.tree.json000066400000000000000000000067571331122015500264520ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "^=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "^=", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Numeric", "value": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/assignment/migrated_0013.js000066400000000000000000000000071331122015500251360ustar00rootroot00000000000000x |= 42esprima-4.0.1/test/fixtures/expression/assignment/migrated_0013.tree.json000066400000000000000000000067571331122015500264530ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "|=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "|=", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Numeric", "value": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/binary-bitwise/000077500000000000000000000000001331122015500231245ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/binary-bitwise/migrated_0000.js000066400000000000000000000000051331122015500257100ustar00rootroot00000000000000x & yesprima-4.0.1/test/fixtures/expression/binary-bitwise/migrated_0000.tree.json000066400000000000000000000067151331122015500272210ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "&", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "&", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/expression/binary-bitwise/migrated_0001.js000066400000000000000000000000051331122015500257110ustar00rootroot00000000000000x ^ yesprima-4.0.1/test/fixtures/expression/binary-bitwise/migrated_0001.tree.json000066400000000000000000000067151331122015500272220ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "^", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "^", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/expression/binary-bitwise/migrated_0002.js000066400000000000000000000000051331122015500257120ustar00rootroot00000000000000x | yesprima-4.0.1/test/fixtures/expression/binary-bitwise/migrated_0002.tree.json000066400000000000000000000067151331122015500272230ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "|", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "|", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/expression/binary-logical/000077500000000000000000000000001331122015500230705ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/binary-logical/migrated_0000.js000066400000000000000000000000061331122015500256550ustar00rootroot00000000000000x || yesprima-4.0.1/test/fixtures/expression/binary-logical/migrated_0000.tree.json000066400000000000000000000067201331122015500271610ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "LogicalExpression", "operator": "||", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "||", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/binary-logical/migrated_0001.js000066400000000000000000000000061331122015500256560ustar00rootroot00000000000000x && yesprima-4.0.1/test/fixtures/expression/binary-logical/migrated_0001.tree.json000066400000000000000000000067201331122015500271620ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "LogicalExpression", "operator": "&&", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "&&", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/binary-logical/migrated_0002.js000066400000000000000000000000131331122015500256550ustar00rootroot00000000000000x || y || zesprima-4.0.1/test/fixtures/expression/binary-logical/migrated_0002.tree.json000066400000000000000000000130021331122015500271520ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "LogicalExpression", "operator": "||", "left": { "type": "LogicalExpression", "operator": "||", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "||", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "||", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "z", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/expression/binary-logical/migrated_0003.js000066400000000000000000000000131331122015500256560ustar00rootroot00000000000000x && y && zesprima-4.0.1/test/fixtures/expression/binary-logical/migrated_0003.tree.json000066400000000000000000000130021331122015500271530ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "LogicalExpression", "operator": "&&", "left": { "type": "LogicalExpression", "operator": "&&", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "&&", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "&&", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "z", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/expression/binary-logical/migrated_0004.js000066400000000000000000000000131331122015500256570ustar00rootroot00000000000000x || y && zesprima-4.0.1/test/fixtures/expression/binary-logical/migrated_0004.tree.json000066400000000000000000000130041331122015500271560ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "LogicalExpression", "operator": "||", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "LogicalExpression", "operator": "&&", "left": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "range": [ 5, 11 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "||", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "&&", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "z", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/expression/binary-logical/migrated_0005.js000066400000000000000000000000121331122015500256570ustar00rootroot00000000000000x || y ^ zesprima-4.0.1/test/fixtures/expression/binary-logical/migrated_0005.tree.json000066400000000000000000000127751331122015500271750ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "LogicalExpression", "operator": "||", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "BinaryExpression", "operator": "^", "left": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "range": [ 5, 10 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 10 } } }, "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } }, "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "||", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "^", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "z", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } } ], "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } } esprima-4.0.1/test/fixtures/expression/binary/000077500000000000000000000000001331122015500214605ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/binary/migrated_0000.js000066400000000000000000000000111331122015500242410ustar00rootroot00000000000000x + y + zesprima-4.0.1/test/fixtures/expression/binary/migrated_0000.tree.json000066400000000000000000000127561331122015500255570ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "+", "left": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "+", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "+", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0001.js000066400000000000000000000000111331122015500242420ustar00rootroot00000000000000x - y + zesprima-4.0.1/test/fixtures/expression/binary/migrated_0001.tree.json000066400000000000000000000127561331122015500255600ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "+", "left": { "type": "BinaryExpression", "operator": "-", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "-", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "+", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0002.js000066400000000000000000000000111331122015500242430ustar00rootroot00000000000000x + y - zesprima-4.0.1/test/fixtures/expression/binary/migrated_0002.tree.json000066400000000000000000000127561331122015500255610ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "-", "left": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "+", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "-", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0003.js000066400000000000000000000000111331122015500242440ustar00rootroot00000000000000x - y - zesprima-4.0.1/test/fixtures/expression/binary/migrated_0003.tree.json000066400000000000000000000127561331122015500255620ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "-", "left": { "type": "BinaryExpression", "operator": "-", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "-", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "-", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0004.js000066400000000000000000000000111331122015500242450ustar00rootroot00000000000000x + y * zesprima-4.0.1/test/fixtures/expression/binary/migrated_0004.tree.json000066400000000000000000000127561331122015500255630ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "+", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "*", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0005.js000066400000000000000000000000111331122015500242460ustar00rootroot00000000000000x + y / zesprima-4.0.1/test/fixtures/expression/binary/migrated_0005.tree.json000066400000000000000000000127561331122015500255640ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "BinaryExpression", "operator": "/", "left": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "+", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "/", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0006.js000066400000000000000000000000111331122015500242470ustar00rootroot00000000000000x - y % zesprima-4.0.1/test/fixtures/expression/binary/migrated_0006.tree.json000066400000000000000000000127561331122015500255650ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "-", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "BinaryExpression", "operator": "%", "left": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "-", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "%", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0007.js000066400000000000000000000000111331122015500242500ustar00rootroot00000000000000x * y * zesprima-4.0.1/test/fixtures/expression/binary/migrated_0007.tree.json000066400000000000000000000127561331122015500255660ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "*", "left": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "*", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "*", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0008.js000066400000000000000000000000111331122015500242510ustar00rootroot00000000000000x * y / zesprima-4.0.1/test/fixtures/expression/binary/migrated_0008.tree.json000066400000000000000000000127561331122015500255670ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "/", "left": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "*", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "/", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0009.js000066400000000000000000000000111331122015500242520ustar00rootroot00000000000000x * y % zesprima-4.0.1/test/fixtures/expression/binary/migrated_0009.tree.json000066400000000000000000000127561331122015500255700ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "%", "left": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "*", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "%", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0010.js000066400000000000000000000000111331122015500242420ustar00rootroot00000000000000x % y * zesprima-4.0.1/test/fixtures/expression/binary/migrated_0010.tree.json000066400000000000000000000127561331122015500255600ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "*", "left": { "type": "BinaryExpression", "operator": "%", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "%", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "*", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0011.js000066400000000000000000000000131331122015500242450ustar00rootroot00000000000000x << y << zesprima-4.0.1/test/fixtures/expression/binary/migrated_0011.tree.json000066400000000000000000000130001331122015500255400ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "<<", "left": { "type": "BinaryExpression", "operator": "<<", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "<<", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "<<", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "z", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0012.js000066400000000000000000000000111331122015500242440ustar00rootroot00000000000000x | y | zesprima-4.0.1/test/fixtures/expression/binary/migrated_0012.tree.json000066400000000000000000000127561331122015500255620ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "|", "left": { "type": "BinaryExpression", "operator": "|", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "|", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "|", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0013.js000066400000000000000000000000111331122015500242450ustar00rootroot00000000000000x & y & zesprima-4.0.1/test/fixtures/expression/binary/migrated_0013.tree.json000066400000000000000000000127561331122015500255630ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "&", "left": { "type": "BinaryExpression", "operator": "&", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "&", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "&", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0014.js000066400000000000000000000000111331122015500242460ustar00rootroot00000000000000x ^ y ^ zesprima-4.0.1/test/fixtures/expression/binary/migrated_0014.tree.json000066400000000000000000000127561331122015500255640ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "^", "left": { "type": "BinaryExpression", "operator": "^", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "^", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "^", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0015.js000066400000000000000000000000111331122015500242470ustar00rootroot00000000000000x & y | zesprima-4.0.1/test/fixtures/expression/binary/migrated_0015.tree.json000066400000000000000000000127561331122015500255650ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "|", "left": { "type": "BinaryExpression", "operator": "&", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "&", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "|", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0016.js000066400000000000000000000000111331122015500242500ustar00rootroot00000000000000x | y ^ zesprima-4.0.1/test/fixtures/expression/binary/migrated_0016.tree.json000066400000000000000000000127561331122015500255660ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "|", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "BinaryExpression", "operator": "^", "left": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "|", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "^", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/migrated_0017.js000066400000000000000000000000111331122015500242510ustar00rootroot00000000000000x | y & zesprima-4.0.1/test/fixtures/expression/binary/migrated_0017.tree.json000066400000000000000000000127561331122015500255670ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "|", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "BinaryExpression", "operator": "&", "left": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "|", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "&", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/binary/multiline_string.js000066400000000000000000000000131331122015500254000ustar00rootroot00000000000000'\ ' + bar esprima-4.0.1/test/fixtures/expression/binary/multiline_string.tree.json000066400000000000000000000067711331122015500267140ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Literal", "value": "", "raw": "'\\\n'", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 1 } } }, "right": { "type": "Identifier", "name": "bar", "range": [ 7, 10 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 7 } } }, "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 7 } } }, "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "'\\\n'", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 1 } } }, { "type": "Punctuator", "value": "+", "range": [ 5, 6 ], "loc": { "start": { "line": 2, "column": 2 }, "end": { "line": 2, "column": 3 } } }, { "type": "Identifier", "value": "bar", "range": [ 7, 10 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 7 } } } ], "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/bitwise-shift/000077500000000000000000000000001331122015500227555ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/bitwise-shift/migrated_0000.js000066400000000000000000000000061331122015500255420ustar00rootroot00000000000000x << yesprima-4.0.1/test/fixtures/expression/bitwise-shift/migrated_0000.tree.json000066400000000000000000000067171331122015500270540ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "<<", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "<<", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/bitwise-shift/migrated_0001.js000066400000000000000000000000061331122015500255430ustar00rootroot00000000000000x >> yesprima-4.0.1/test/fixtures/expression/bitwise-shift/migrated_0001.tree.json000066400000000000000000000067171331122015500270550ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": ">>", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": ">>", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/bitwise-shift/migrated_0002.js000066400000000000000000000000071331122015500255450ustar00rootroot00000000000000x >>> yesprima-4.0.1/test/fixtures/expression/bitwise-shift/migrated_0002.tree.json000066400000000000000000000067211331122015500270510ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": ">>>", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": ">>>", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "y", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/complex/000077500000000000000000000000001331122015500216435ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/complex/migrated_0000.js000066400000000000000000000000561331122015500244350ustar00rootroot00000000000000a || b && c | d ^ e & f == g < h >>> i + j * kesprima-4.0.1/test/fixtures/expression/complex/migrated_0000.tree.json000066400000000000000000000657221331122015500257430ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "LogicalExpression", "operator": "||", "left": { "type": "Identifier", "name": "a", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "LogicalExpression", "operator": "&&", "left": { "type": "Identifier", "name": "b", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "right": { "type": "BinaryExpression", "operator": "|", "left": { "type": "Identifier", "name": "c", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "right": { "type": "BinaryExpression", "operator": "^", "left": { "type": "Identifier", "name": "d", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, "right": { "type": "BinaryExpression", "operator": "&", "left": { "type": "Identifier", "name": "e", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, "right": { "type": "BinaryExpression", "operator": "==", "left": { "type": "Identifier", "name": "f", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "right": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "g", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, "right": { "type": "BinaryExpression", "operator": ">>>", "left": { "type": "Identifier", "name": "h", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, "right": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "i", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, "right": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "j", "range": [ 41, 42 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 42 } } }, "right": { "type": "Identifier", "name": "k", "range": [ 45, 46 ], "loc": { "start": { "line": 1, "column": 45 }, "end": { "line": 1, "column": 46 } } }, "range": [ 41, 46 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 46 } } }, "range": [ 37, 46 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 46 } } }, "range": [ 31, 46 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 46 } } }, "range": [ 27, 46 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 46 } } }, "range": [ 22, 46 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 46 } } }, "range": [ 18, 46 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 46 } } }, "range": [ 14, 46 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 46 } } }, "range": [ 10, 46 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 46 } } }, "range": [ 5, 46 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 46 } } }, "range": [ 0, 46 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 46 } } }, "range": [ 0, 46 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 46 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "a", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "||", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "b", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "&&", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "c", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "|", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "d", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "^", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "e", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "&", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "f", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "==", "range": [ 24, 26 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "g", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "<", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Identifier", "value": "h", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": ">>>", "range": [ 33, 36 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 36 } } }, { "type": "Identifier", "value": "i", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": "+", "range": [ 39, 40 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 40 } } }, { "type": "Identifier", "value": "j", "range": [ 41, 42 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 42 } } }, { "type": "Punctuator", "value": "*", "range": [ 43, 44 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 44 } } }, { "type": "Identifier", "value": "k", "range": [ 45, 46 ], "loc": { "start": { "line": 1, "column": 45 }, "end": { "line": 1, "column": 46 } } } ], "range": [ 0, 46 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 46 } } } esprima-4.0.1/test/fixtures/expression/complex/migrated_0001.js000066400000000000000000000000251331122015500244320ustar00rootroot00000000000000a + (b < (c * d)) + eesprima-4.0.1/test/fixtures/expression/complex/migrated_0001.tree.json000066400000000000000000000301351331122015500257320ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "+", "left": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Identifier", "name": "a", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 }, "source": "42.js" } }, "right": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "b", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 }, "source": "42.js" } }, "right": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "c", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 }, "source": "42.js" } }, "right": { "type": "Identifier", "name": "d", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 }, "source": "42.js" } }, "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 }, "source": "42.js" } }, "range": [ 5, 16 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 16 }, "source": "42.js" } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 }, "source": "42.js" } }, "right": { "type": "Identifier", "name": "e", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 }, "source": "42.js" } }, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 }, "source": "42.js" } }, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 }, "source": "42.js" } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "a", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "+", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "b", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "<", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "(", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "c", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "*", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "d", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "+", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "value": "e", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 }, "source": "42.js" } } esprima-4.0.1/test/fixtures/expression/conditional/000077500000000000000000000000001331122015500224775ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/conditional/migrated_0000.js000066400000000000000000000000111331122015500252600ustar00rootroot00000000000000y ? 1 : 2esprima-4.0.1/test/fixtures/expression/conditional/migrated_0000.tree.json000066400000000000000000000115061331122015500265660ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ConditionalExpression", "test": { "type": "Identifier", "name": "y", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "consequent": { "type": "Literal", "value": 1, "raw": "1", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "alternate": { "type": "Literal", "value": 2, "raw": "2", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "y", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "?", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Numeric", "value": "1", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ":", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Numeric", "value": "2", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/conditional/migrated_0001.js000066400000000000000000000000161331122015500252660ustar00rootroot00000000000000x && y ? 1 : 2esprima-4.0.1/test/fixtures/expression/conditional/migrated_0001.tree.json000066400000000000000000000156001331122015500265660ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ConditionalExpression", "test": { "type": "LogicalExpression", "operator": "&&", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "consequent": { "type": "Literal", "value": 1, "raw": "1", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "alternate": { "type": "Literal", "value": 2, "raw": "2", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "&&", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "?", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Numeric", "value": "1", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ":", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Numeric", "value": "2", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } esprima-4.0.1/test/fixtures/expression/conditional/migrated_0002.js000066400000000000000000000000171331122015500252700ustar00rootroot00000000000000x = (0) ? 1 : 2esprima-4.0.1/test/fixtures/expression/conditional/migrated_0002.tree.json000066400000000000000000000174341331122015500265760ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ConditionalExpression", "test": { "type": "Literal", "value": 0, "raw": "0", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "consequent": { "type": "Literal", "value": 1, "raw": "1", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "alternate": { "type": "Literal", "value": 2, "raw": "2", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, "range": [ 4, 15 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 15 } } }, "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } }, "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Numeric", "value": "0", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": ")", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "?", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Numeric", "value": "1", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ":", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Numeric", "value": "2", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } esprima-4.0.1/test/fixtures/expression/equality/000077500000000000000000000000001331122015500220315ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/equality/migrated_0000.js000066400000000000000000000000061331122015500246160ustar00rootroot00000000000000x == yesprima-4.0.1/test/fixtures/expression/equality/migrated_0000.tree.json000066400000000000000000000067171331122015500261300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "==", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "==", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/equality/migrated_0001.js000066400000000000000000000000061331122015500246170ustar00rootroot00000000000000x != yesprima-4.0.1/test/fixtures/expression/equality/migrated_0001.tree.json000066400000000000000000000067171331122015500261310ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "!=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "!=", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/equality/migrated_0002.js000066400000000000000000000000071331122015500246210ustar00rootroot00000000000000x === yesprima-4.0.1/test/fixtures/expression/equality/migrated_0002.tree.json000066400000000000000000000067211331122015500261250ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "===", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "===", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "y", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/equality/migrated_0003.js000066400000000000000000000000071331122015500246220ustar00rootroot00000000000000x !== yesprima-4.0.1/test/fixtures/expression/equality/migrated_0003.tree.json000066400000000000000000000067211331122015500261260ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "!==", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "!==", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "y", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/grouping/000077500000000000000000000000001331122015500220265ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/grouping/migrated_0000.js000066400000000000000000000000171331122015500246150ustar00rootroot00000000000000(1) + (2 ) + 3esprima-4.0.1/test/fixtures/expression/grouping/migrated_0000.tree.json000066400000000000000000000162611331122015500261200ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "+", "left": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Literal", "value": 1, "raw": "1", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, "right": { "type": "Literal", "value": 2, "raw": "2", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } }, "right": { "type": "Literal", "value": 3, "raw": "3", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } }, "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Numeric", "value": "1", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": ")", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "+", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Numeric", "value": "2", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "+", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Numeric", "value": "3", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } esprima-4.0.1/test/fixtures/expression/grouping/migrated_0001.js000066400000000000000000000000141331122015500246130ustar00rootroot000000000000004 + 5 << (6)esprima-4.0.1/test/fixtures/expression/grouping/migrated_0001.tree.json000066400000000000000000000146031331122015500261170ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "<<", "left": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Literal", "value": 4, "raw": "4", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Literal", "value": 5, "raw": "5", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Literal", "value": 6, "raw": "6", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "4", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "+", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Numeric", "value": "5", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "<<", "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "(", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Numeric", "value": "6", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } } ], "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/000077500000000000000000000000001331122015500227605ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/left-hand-side/let_object_computed.js000066400000000000000000000000171331122015500273260ustar00rootroot00000000000000(let[foo]=bar) esprima-4.0.1/test/fixtures/expression/left-hand-side/let_object_computed.tree.json000066400000000000000000000153271331122015500306330ustar00rootroot00000000000000{ "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } }, "type": "Program", "body": [ { "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } }, "type": "ExpressionStatement", "expression": { "range": [ 1, 13 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 13 } }, "type": "AssignmentExpression", "operator": "=", "left": { "range": [ 1, 9 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 9 } }, "type": "MemberExpression", "computed": true, "object": { "range": [ 1, 4 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 4 } }, "type": "Identifier", "name": "let" }, "property": { "range": [ 5, 8 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 8 } }, "type": "Identifier", "name": "foo" } }, "right": { "range": [ 10, 13 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 13 } }, "type": "Identifier", "name": "bar" } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "let", "range": [ 1, 4 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "[", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "foo", "range": [ 5, 8 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "]", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "=", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "bar", "range": [ 10, 13 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } } ] } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0000.js000066400000000000000000000000121331122015500255420ustar00rootroot00000000000000new Buttonesprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0000.tree.json000066400000000000000000000050331331122015500270450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "Button", "range": [ 4, 10 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 10 } } }, "arguments": [], "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } }, "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "new", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "Button", "range": [ 4, 10 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 10 } } } ], "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0001.js000066400000000000000000000000141331122015500255450ustar00rootroot00000000000000new Button()esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0001.tree.json000066400000000000000000000065171331122015500270560ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "Button", "range": [ 4, 10 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 10 } } }, "arguments": [], "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "new", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "Button", "range": [ 4, 10 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } } ], "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0002.js000066400000000000000000000000131331122015500255450ustar00rootroot00000000000000new new fooesprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0002.tree.json000066400000000000000000000070521331122015500270520ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "NewExpression", "callee": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "foo", "range": [ 8, 11 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 11 } } }, "arguments": [], "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, "arguments": [], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "new", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Keyword", "value": "new", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "foo", "range": [ 8, 11 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0003.js000066400000000000000000000000151331122015500255500ustar00rootroot00000000000000new new foo()esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0003.tree.json000066400000000000000000000105361331122015500270540ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "NewExpression", "callee": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "foo", "range": [ 8, 11 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 11 } } }, "arguments": [], "range": [ 4, 13 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 13 } } }, "arguments": [], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "new", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Keyword", "value": "new", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "foo", "range": [ 8, 11 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "(", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ")", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0004.js000066400000000000000000000000171331122015500255530ustar00rootroot00000000000000new foo().bar()esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0004.tree.json000066400000000000000000000155601331122015500270570ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "foo", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, "arguments": [], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "property": { "type": "Identifier", "name": "bar", "range": [ 10, 13 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, "arguments": [], "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } }, "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "new", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "foo", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "(", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ".", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "bar", "range": [ 10, 13 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ")", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0005.js000066400000000000000000000000141331122015500255510ustar00rootroot00000000000000new foo[bar]esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0005.tree.json000066400000000000000000000117341331122015500270570ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "NewExpression", "callee": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "foo", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, "property": { "type": "Identifier", "name": "bar", "range": [ 8, 11 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 11 } } }, "range": [ 4, 12 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 12 } } }, "arguments": [], "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "new", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "foo", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "[", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "bar", "range": [ 8, 11 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "]", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } } ], "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0006.js000066400000000000000000000000151331122015500255530ustar00rootroot00000000000000new foo.bar()esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0006.tree.json000066400000000000000000000125671331122015500270650ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "NewExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "foo", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, "property": { "type": "Identifier", "name": "bar", "range": [ 8, 11 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 11 } } }, "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, "arguments": [], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "new", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "foo", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ".", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "bar", "range": [ 8, 11 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "(", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ")", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0007.js000066400000000000000000000000201331122015500255500ustar00rootroot00000000000000( new foo).bar()esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0007.tree.json000066400000000000000000000155641331122015500270660ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "foo", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, "arguments": [], "range": [ 2, 9 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 9 } } }, "property": { "type": "Identifier", "name": "bar", "range": [ 11, 14 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 14 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } }, "arguments": [], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } }, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "new", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "foo", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ")", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ".", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "bar", "range": [ 11, 14 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0008.js000066400000000000000000000000151331122015500255550ustar00rootroot00000000000000foo(bar, baz)esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0008.tree.json000066400000000000000000000125451331122015500270630ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "foo", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, "arguments": [ { "type": "Identifier", "name": "bar", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "name": "baz", "range": [ 9, 12 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } } } ], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "foo", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "bar", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ",", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "baz", "range": [ 9, 12 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ")", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0009.js000066400000000000000000000000151331122015500255560ustar00rootroot00000000000000( foo )()esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0009.tree.json000066400000000000000000000073411331122015500270620ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "foo", "range": [ 5, 8 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 8 } } }, "arguments": [], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Identifier", "value": "foo", "range": [ 5, 8 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "(", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ")", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0010.js000066400000000000000000000000211331122015500255430ustar00rootroot00000000000000universe.milkywayesprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0010.tree.json000066400000000000000000000067721331122015500270610ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "property": { "type": "Identifier", "name": "milkyway", "range": [ 9, 17 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ".", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "milkyway", "range": [ 9, 17 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } } ], "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0011.js000066400000000000000000000000351331122015500255510ustar00rootroot00000000000000universe.milkyway.solarsystemesprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0011.tree.json000066400000000000000000000131041331122015500270450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "property": { "type": "Identifier", "name": "milkyway", "range": [ 9, 17 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } }, "property": { "type": "Identifier", "name": "solarsystem", "range": [ 18, 29 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 29 } } }, "range": [ 0, 29 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 29 } } }, "range": [ 0, 29 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 29 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ".", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "milkyway", "range": [ 9, 17 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ".", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "solarsystem", "range": [ 18, 29 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 29 } } } ], "range": [ 0, 29 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 29 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0012.js000066400000000000000000000000431331122015500255510ustar00rootroot00000000000000universe.milkyway.solarsystem.Earthesprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0012.tree.json000066400000000000000000000174221331122015500270550ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "property": { "type": "Identifier", "name": "milkyway", "range": [ 9, 17 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } }, "property": { "type": "Identifier", "name": "solarsystem", "range": [ 18, 29 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 29 } } }, "range": [ 0, 29 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 29 } } }, "property": { "type": "Identifier", "name": "Earth", "range": [ 30, 35 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 35 } } }, "range": [ 0, 35 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 35 } } }, "range": [ 0, 35 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 35 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ".", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "milkyway", "range": [ 9, 17 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ".", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "solarsystem", "range": [ 18, 29 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": ".", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Identifier", "value": "Earth", "range": [ 30, 35 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 35 } } } ], "range": [ 0, 35 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 35 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0013.js000066400000000000000000000000461331122015500255550ustar00rootroot00000000000000universe[galaxyName, otherUselessName]esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0013.tree.json000066400000000000000000000141731331122015500270560ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "property": { "type": "SequenceExpression", "expressions": [ { "type": "Identifier", "name": "galaxyName", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "name": "otherUselessName", "range": [ 21, 37 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 37 } } } ], "range": [ 9, 37 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 37 } } }, "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } }, "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "[", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "galaxyName", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ",", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "otherUselessName", "range": [ 21, 37 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": "]", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } } ], "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0014.js000066400000000000000000000000241331122015500255520ustar00rootroot00000000000000universe[galaxyName]esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0014.tree.json000066400000000000000000000076271331122015500270650ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "property": { "type": "Identifier", "name": "galaxyName", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "[", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "galaxyName", "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "]", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } } ], "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0015.js000066400000000000000000000000251331122015500255540ustar00rootroot00000000000000universe[42].galaxiesesprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0015.tree.json000066400000000000000000000137511331122015500270610ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "property": { "type": "Literal", "value": 42, "raw": "42", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "property": { "type": "Identifier", "name": "galaxies", "range": [ 13, 21 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "[", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Numeric", "value": "42", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "]", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ".", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "galaxies", "range": [ 13, 21 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0016.js000066400000000000000000000000251331122015500255550ustar00rootroot00000000000000universe(42).galaxiesesprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0016.tree.json000066400000000000000000000140721331122015500270570ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": 42, "raw": "42", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "property": { "type": "Identifier", "name": "galaxies", "range": [ 13, 21 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "(", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Numeric", "value": "42", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ".", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "galaxies", "range": [ 13, 21 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0017.js000066400000000000000000000000511331122015500255550ustar00rootroot00000000000000universe(42).galaxies(14, 3, 77).milkywayesprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0017.tree.json000066400000000000000000000342351331122015500270630ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "arguments": [ { "type": "Literal", "value": 42, "raw": "42", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "property": { "type": "Identifier", "name": "galaxies", "range": [ 13, 21 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } }, "arguments": [ { "type": "Literal", "value": 14, "raw": "14", "range": [ 22, 24 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 24 } } }, { "type": "Literal", "value": 3, "raw": "3", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Literal", "value": 77, "raw": "77", "range": [ 29, 31 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 0, 32 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 32 } } }, "property": { "type": "Identifier", "name": "milkyway", "range": [ 33, 41 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 41 } } }, "range": [ 0, 41 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 41 } } }, "range": [ 0, 41 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 41 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "(", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Numeric", "value": "42", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ".", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "galaxies", "range": [ 13, 21 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "(", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Numeric", "value": "14", "range": [ 22, 24 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": ",", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Numeric", "value": "3", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": ",", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Numeric", "value": "77", "range": [ 29, 31 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": ")", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": ".", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Identifier", "value": "milkyway", "range": [ 33, 41 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 41 } } } ], "range": [ 0, 41 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 41 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0018.js000066400000000000000000000000551331122015500255620ustar00rootroot00000000000000earth.asia.Indonesia.prepareForElection(2014)esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0018.tree.json000066400000000000000000000251701331122015500270620ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "earth", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "property": { "type": "Identifier", "name": "asia", "range": [ 6, 10 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 10 } } }, "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } }, "property": { "type": "Identifier", "name": "Indonesia", "range": [ 11, 20 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 20 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } }, "property": { "type": "Identifier", "name": "prepareForElection", "range": [ 21, 39 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 39 } } }, "range": [ 0, 39 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 39 } } }, "arguments": [ { "type": "Literal", "value": 2014, "raw": "2014", "range": [ 40, 44 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 44 } } } ], "range": [ 0, 45 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 45 } } }, "range": [ 0, 45 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 45 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "earth", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ".", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "asia", "range": [ 6, 10 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ".", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "Indonesia", "range": [ 11, 20 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": ".", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "prepareForElection", "range": [ 21, 39 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 39 } } }, { "type": "Punctuator", "value": "(", "range": [ 39, 40 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 40 } } }, { "type": "Numeric", "value": "2014", "range": [ 40, 44 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 44 } } }, { "type": "Punctuator", "value": ")", "range": [ 44, 45 ], "loc": { "start": { "line": 1, "column": 44 }, "end": { "line": 1, "column": 45 } } } ], "range": [ 0, 45 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 45 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0019.js000066400000000000000000000000131331122015500255550ustar00rootroot00000000000000universe.ifesprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0019.tree.json000066400000000000000000000067531331122015500270710ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "property": { "type": "Identifier", "name": "if", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ".", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "if", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0020.js000066400000000000000000000000151331122015500255470ustar00rootroot00000000000000universe.trueesprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0020.tree.json000066400000000000000000000067571331122015500270650ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "property": { "type": "Identifier", "name": "true", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ".", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Boolean", "value": "true", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0021.js000066400000000000000000000000161331122015500255510ustar00rootroot00000000000000universe.falseesprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0021.tree.json000066400000000000000000000067611331122015500270610ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "property": { "type": "Identifier", "name": "false", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ".", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Boolean", "value": "false", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } esprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0022.js000066400000000000000000000000151331122015500255510ustar00rootroot00000000000000universe.nullesprima-4.0.1/test/fixtures/expression/left-hand-side/migrated_0022.tree.json000066400000000000000000000067541331122015500270640ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "property": { "type": "Identifier", "name": "null", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "universe", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ".", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Null", "value": "null", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } esprima-4.0.1/test/fixtures/expression/multiplicative/000077500000000000000000000000001331122015500232275ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/multiplicative/migrated_0000.js000066400000000000000000000000051331122015500260130ustar00rootroot00000000000000x * yesprima-4.0.1/test/fixtures/expression/multiplicative/migrated_0000.tree.json000066400000000000000000000067151331122015500273240ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "*", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/expression/multiplicative/migrated_0001.js000066400000000000000000000000051331122015500260140ustar00rootroot00000000000000x / yesprima-4.0.1/test/fixtures/expression/multiplicative/migrated_0001.tree.json000066400000000000000000000067151331122015500273250ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "/", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "/", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/expression/multiplicative/migrated_0002.js000066400000000000000000000000051331122015500260150ustar00rootroot00000000000000x % yesprima-4.0.1/test/fixtures/expression/multiplicative/migrated_0002.tree.json000066400000000000000000000067151331122015500273260ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "%", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "%", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/expression/postfix/000077500000000000000000000000001331122015500216705ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/postfix/migrated_0000.js000066400000000000000000000000031331122015500244520ustar00rootroot00000000000000x++esprima-4.0.1/test/fixtures/expression/postfix/migrated_0000.tree.json000066400000000000000000000050601331122015500257550ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "prefix": false, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "++", "range": [ 1, 3 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 3 } } } ], "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } esprima-4.0.1/test/fixtures/expression/postfix/migrated_0001.js000066400000000000000000000000031331122015500244530ustar00rootroot00000000000000x--esprima-4.0.1/test/fixtures/expression/postfix/migrated_0001.tree.json000066400000000000000000000050601331122015500257560ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "--", "argument": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "prefix": false, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "--", "range": [ 1, 3 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 3 } } } ], "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } esprima-4.0.1/test/fixtures/expression/postfix/migrated_0002.js000066400000000000000000000000061331122015500244570ustar00rootroot00000000000000eval++esprima-4.0.1/test/fixtures/expression/postfix/migrated_0002.tree.json000066400000000000000000000050661331122015500257650ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "eval", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "prefix": false, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "eval", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "++", "range": [ 4, 6 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/postfix/migrated_0003.js000066400000000000000000000000061331122015500244600ustar00rootroot00000000000000eval--esprima-4.0.1/test/fixtures/expression/postfix/migrated_0003.tree.json000066400000000000000000000050661331122015500257660ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "--", "argument": { "type": "Identifier", "name": "eval", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "prefix": false, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "eval", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "--", "range": [ 4, 6 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/postfix/migrated_0004.js000066400000000000000000000000131331122015500244570ustar00rootroot00000000000000arguments++esprima-4.0.1/test/fixtures/expression/postfix/migrated_0004.tree.json000066400000000000000000000051101331122015500257550ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "arguments", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "prefix": false, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "arguments", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "++", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/expression/postfix/migrated_0005.js000066400000000000000000000000131331122015500244600ustar00rootroot00000000000000arguments--esprima-4.0.1/test/fixtures/expression/postfix/migrated_0005.tree.json000066400000000000000000000051101331122015500257560ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "--", "argument": { "type": "Identifier", "name": "arguments", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "prefix": false, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "arguments", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "--", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/expression/primary/000077500000000000000000000000001331122015500216575ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/array/000077500000000000000000000000001331122015500227755ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0000.js000066400000000000000000000000061331122015500255620ustar00rootroot00000000000000x = []esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0000.tree.json000066400000000000000000000075571331122015500270770ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ArrayExpression", "elements": [], "range": [ 4, 6 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "[", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "]", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0001.js000066400000000000000000000000071331122015500255640ustar00rootroot00000000000000x = [ ]esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0001.tree.json000066400000000000000000000075571331122015500271000ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ArrayExpression", "elements": [], "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "[", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "]", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0002.js000066400000000000000000000000121331122015500255610ustar00rootroot00000000000000x = [ 42 ]esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0002.tree.json000066400000000000000000000117741331122015500270750ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 42, "raw": "42", "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } } ], "range": [ 4, 10 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 10 } } }, "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } }, "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "[", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Numeric", "value": "42", "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "]", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } } ], "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } } esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0003.js000066400000000000000000000000131331122015500255630ustar00rootroot00000000000000x = [ 42, ]esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0003.tree.json000066400000000000000000000126241331122015500270710ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 42, "raw": "42", "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } } ], "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "[", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Numeric", "value": "42", "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ",", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "]", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0004.js000066400000000000000000000000151331122015500255660ustar00rootroot00000000000000x = [ ,, 42 ]esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0004.tree.json000066400000000000000000000135521331122015500270730ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ArrayExpression", "elements": [ null, null, { "type": "Literal", "value": 42, "raw": "42", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 4, 13 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "[", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ",", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ",", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Numeric", "value": "42", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "]", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0005.js000066400000000000000000000000201331122015500255630ustar00rootroot00000000000000x = [ 1, 2, 3, ]esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0005.tree.json000066400000000000000000000206511331122015500270720ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 1, "raw": "1", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Literal", "value": 2, "raw": "2", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Literal", "value": 3, "raw": "3", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 4, 16 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 16 } } }, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } }, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "[", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Numeric", "value": "1", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ",", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Numeric", "value": "2", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ",", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Numeric", "value": "3", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ",", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "]", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0006.js000066400000000000000000000000211331122015500255650ustar00rootroot00000000000000x = [ 1, 2,, 3, ]esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0006.tree.json000066400000000000000000000215411331122015500270720ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": 1, "raw": "1", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Literal", "value": 2, "raw": "2", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, null, { "type": "Literal", "value": 3, "raw": "3", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 4, 17 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "[", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Numeric", "value": "1", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ",", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Numeric", "value": "2", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ",", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ",", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Numeric", "value": "3", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ",", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "]", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } } ], "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0007.js000066400000000000000000000000161331122015500255720ustar00rootroot00000000000000日本語 = []esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0007.tree.json000066400000000000000000000075771331122015500271100ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "日本語", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, "right": { "type": "ArrayExpression", "elements": [], "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } }, "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "日本語", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "=", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "[", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "]", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } } ], "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0008.source.js000066400000000000000000000000341331122015500270720ustar00rootroot00000000000000var source = 'T\u203F = []';esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0008.tree.json000066400000000000000000000075651331122015500271060ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "T‿", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, "right": { "type": "ArrayExpression", "elements": [], "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "T‿", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "=", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "[", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "]", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0009.source.js000066400000000000000000000000341331122015500270730ustar00rootroot00000000000000var source = 'T\u200C = []';esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0009.tree.json000066400000000000000000000075651331122015500271070ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "T‌", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, "right": { "type": "ArrayExpression", "elements": [], "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "T‌", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "=", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "[", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "]", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0010.source.js000066400000000000000000000000341331122015500270630ustar00rootroot00000000000000var source = 'T\u200D = []';esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0010.tree.json000066400000000000000000000075651331122015500270770ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "T‍", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, "right": { "type": "ArrayExpression", "elements": [], "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "T‍", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "=", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "[", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "]", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0011.source.js000066400000000000000000000000411331122015500270620ustar00rootroot00000000000000var source = '\u2163\u2161 = []';esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0011.tree.json000066400000000000000000000075711331122015500270750ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "ⅣⅡ", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, "right": { "type": "ArrayExpression", "elements": [], "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "ⅣⅡ", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "=", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "[", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "]", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0012.source.js000066400000000000000000000000531331122015500270660ustar00rootroot00000000000000var source = '\u2163\u2161\u200A=\u2009[]';esprima-4.0.1/test/fixtures/expression/primary/array/migrated_0012.tree.json000066400000000000000000000075711331122015500270760ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "ⅣⅡ", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, "right": { "type": "ArrayExpression", "elements": [], "range": [ 5, 7 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "ⅣⅡ", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "=", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "[", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "]", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/primary/keyword/000077500000000000000000000000001331122015500233435ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/keyword/invalid-escaped-if.js000066400000000000000000000000241331122015500273210ustar00rootroot00000000000000\u0069\u{66} (1) {} esprima-4.0.1/test/fixtures/expression/primary/keyword/invalid-escaped-if.tree.json000066400000000000000000000104661331122015500306270ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "IfStatement", "test": { "type": "Literal", "value": 1, "raw": "1", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, "consequent": { "type": "BlockStatement", "body": [], "range": [ 17, 19 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 19 } } }, "alternate": null, "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } } ], "sourceType": "script", "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } }, "tokens": [ { "type": "Keyword", "value": "\\u0069\\u{66}", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "(", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Numeric", "value": "1", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "{", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "}", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } } ], "errors": [ { "index": 0, "lineNumber": 1, "column": 1, "message": "Error: Line 1: Keyword must not contain escaped characters" } ] }esprima-4.0.1/test/fixtures/expression/primary/keyword/invalid-escaped-null.js000066400000000000000000000000121331122015500276720ustar00rootroot00000000000000nul\u{6c} esprima-4.0.1/test/fixtures/expression/primary/keyword/invalid-escaped-null.tree.json000066400000000000000000000034571331122015500312050ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": null, "raw": "nul\\u{6c}", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } }, "tokens": [ { "type": "Null", "value": "nul\\u{6c}", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "errors": [ { "index": 0, "lineNumber": 1, "column": 1, "message": "Error: Line 1: Keyword must not contain escaped characters" } ] }esprima-4.0.1/test/fixtures/expression/primary/keyword/invalid-escaped-true.js000066400000000000000000000000121331122015500276770ustar00rootroot00000000000000\u0074rue esprima-4.0.1/test/fixtures/expression/primary/keyword/invalid-escaped-true.tree.json000066400000000000000000000034621331122015500312060ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": true, "raw": "\\u0074rue", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } }, "tokens": [ { "type": "Boolean", "value": "\\u0074rue", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "errors": [ { "index": 0, "lineNumber": 1, "column": 1, "message": "Error: Line 1: Keyword must not contain escaped characters" } ] }esprima-4.0.1/test/fixtures/expression/primary/literal/000077500000000000000000000000001331122015500233135ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/000077500000000000000000000000001331122015500247555ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/invalid_hex.failure.json000066400000000000000000000002021331122015500315620ustar00rootroot00000000000000{"index":3,"lineNumber":1,"column":4,"message":"Error: Line 1: Unexpected token ILLEGAL","description":"Unexpected token ILLEGAL"}esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/invalid_hex.js000066400000000000000000000000051331122015500276000ustar00rootroot000000000000000xFG esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0000.js000066400000000000000000000000011331122015500275350ustar00rootroot000000000000000esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0000.tree.json000066400000000000000000000031211331122015500310360ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 0, "raw": "0", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "0", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } } ], "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0001.js000066400000000000000000000000021331122015500275370ustar00rootroot0000000000000042esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0001.tree.json000066400000000000000000000031241331122015500310420ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 42, "raw": "42", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "42", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } ], "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0002.js000066400000000000000000000000011331122015500275370ustar00rootroot000000000000003esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0002.tree.json000066400000000000000000000012151331122015500310420ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 3, "raw": "3", "range": [ 0, 1 ] }, "range": [ 0, 1 ] } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "3", "range": [ 0, 1 ] } ], "range": [ 0, 1 ] } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0003.js000066400000000000000000000000011331122015500275400ustar00rootroot000000000000005esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0003.tree.json000066400000000000000000000024651331122015500310530ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 5, "raw": "5", "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "5", "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } } ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0004.js000066400000000000000000000000031331122015500275430ustar00rootroot00000000000000.14esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0004.tree.json000066400000000000000000000031301331122015500310420ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 0.14, "raw": ".14", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": ".14", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } ], "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0005.js000066400000000000000000000000071331122015500275500ustar00rootroot000000000000003.14159esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0005.tree.json000066400000000000000000000031431331122015500310470ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 3.14159, "raw": "3.14159", "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "3.14159", "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0006.js000066400000000000000000000000161331122015500275510ustar00rootroot000000000000006.02214179e+23esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0006.tree.json000066400000000000000000000032001331122015500310420ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 6.02214179e+23, "raw": "6.02214179e+23", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "6.02214179e+23", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0007.js000066400000000000000000000000171331122015500275530ustar00rootroot000000000000001.492417830e-10esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0007.tree.json000066400000000000000000000032021331122015500310450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 1.49241783e-10, "raw": "1.492417830e-10", "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } }, "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "1.492417830e-10", "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0008.js000066400000000000000000000000031331122015500275470ustar00rootroot000000000000000x0esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0008.tree.json000066400000000000000000000031251331122015500310520ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 0, "raw": "0x0", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "0x0", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } ], "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0009.js000066400000000000000000000000041331122015500275510ustar00rootroot000000000000000x0;esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0009.tree.json000066400000000000000000000037531331122015500310620ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 0, "raw": "0x0", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "0x0", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": ";", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } } ], "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0010.js000066400000000000000000000000071331122015500275440ustar00rootroot000000000000000e+100 esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0010.tree.json000066400000000000000000000031331331122015500310420ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 0, "raw": "0e+100", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "0e+100", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0011.js000066400000000000000000000000061331122015500275440ustar00rootroot000000000000000e+100esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0011.tree.json000066400000000000000000000031331331122015500310430ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 0, "raw": "0e+100", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "0e+100", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0012.js000066400000000000000000000000051331122015500275440ustar00rootroot000000000000000xabcesprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0012.tree.json000066400000000000000000000031341331122015500310450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 2748, "raw": "0xabc", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "0xabc", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0013.js000066400000000000000000000000051331122015500275450ustar00rootroot000000000000000xdefesprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0013.tree.json000066400000000000000000000031341331122015500310460ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 3567, "raw": "0xdef", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "0xdef", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0014.js000066400000000000000000000000041331122015500275450ustar00rootroot000000000000000X1Aesprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0014.tree.json000066400000000000000000000031301331122015500310430ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 26, "raw": "0X1A", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "0X1A", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0015.js000066400000000000000000000000041331122015500275460ustar00rootroot000000000000000x10esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0015.tree.json000066400000000000000000000031301331122015500310440ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 16, "raw": "0x10", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "0x10", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0016.js000066400000000000000000000000051331122015500275500ustar00rootroot000000000000000x100esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0016.tree.json000066400000000000000000000031331331122015500310500ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 256, "raw": "0x100", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "0x100", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0017.js000066400000000000000000000000041331122015500275500ustar00rootroot000000000000000X04esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0017.tree.json000066400000000000000000000031271331122015500310540ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 4, "raw": "0X04", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "0X04", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0018.js000066400000000000000000000000021331122015500275470ustar00rootroot0000000000000002esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0018.tree.json000066400000000000000000000031231331122015500310510ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 2, "raw": "02", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "02", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } ], "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0019.js000066400000000000000000000000031331122015500275510ustar00rootroot00000000000000012esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0019.tree.json000066400000000000000000000031261331122015500310550ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 10, "raw": "012", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "012", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } ], "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0020.js000066400000000000000000000000041331122015500275420ustar00rootroot000000000000000012esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0020.tree.json000066400000000000000000000031301331122015500310400ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 10, "raw": "0012", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "0012", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0021.js000066400000000000000000000000021331122015500275410ustar00rootroot0000000000000008esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0021.tree.json000066400000000000000000000031231331122015500310430ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 8, "raw": "08", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "08", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } ], "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0022.js000066400000000000000000000000041331122015500275440ustar00rootroot000000000000000008esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0022.tree.json000066400000000000000000000031271331122015500310500ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 8, "raw": "0008", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "0008", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0023.js000066400000000000000000000000021331122015500275430ustar00rootroot0000000000000009esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0023.tree.json000066400000000000000000000031231331122015500310450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 9, "raw": "09", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "09", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } ], "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0024.js000066400000000000000000000000041331122015500275460ustar00rootroot0000000000000009.5esprima-4.0.1/test/fixtures/expression/primary/literal/numeric/migrated_0024.tree.json000066400000000000000000000031311331122015500310450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 9.5, "raw": "09.5", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "09.5", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/000077500000000000000000000000001331122015500271515ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0000.js000066400000000000000000000000041331122015500317340ustar00rootroot00000000000000/p/;esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0000.tree.json000066400000000000000000000043121331122015500332350ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": {}, "raw": "/p/", "regex": { "pattern": "p", "flags": "" }, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "sourceType": "script", "tokens": [ { "type": "RegularExpression", "value": "/p/", "regex": { "pattern": "p", "flags": "" }, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": ";", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } } ], "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0001.js000066400000000000000000000000051331122015500317360ustar00rootroot00000000000000[/q/]esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0001.tree.json000066400000000000000000000064151331122015500332440ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ArrayExpression", "elements": [ { "type": "Literal", "value": {}, "raw": "/q/", "regex": { "pattern": "q", "flags": "" }, "range": [ 1, 4 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 4 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "[", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "RegularExpression", "value": "/q/", "regex": { "pattern": "q", "flags": "" }, "range": [ 1, 4 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "]", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0002.js000066400000000000000000000000201331122015500317340ustar00rootroot00000000000000var x = /[a-z]/iesprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0002.tree.json000066400000000000000000000106131331122015500332400ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": {}, "raw": "/[a-z]/i", "regex": { "pattern": "[a-z]", "flags": "i" }, "range": [ 8, 16 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 16 } } }, "range": [ 4, 16 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 16 } } } ], "kind": "var", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "RegularExpression", "value": "/[a-z]/i", "regex": { "pattern": "[a-z]", "flags": "i" }, "range": [ 8, 16 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0003.js000066400000000000000000000000201331122015500317350ustar00rootroot00000000000000var x = /[a-z]/yesprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0003.tree.json000066400000000000000000000106151331122015500332430ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": null, "raw": "/[a-z]/y", "regex": { "pattern": "[a-z]", "flags": "y" }, "range": [ 8, 16 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 16 } } }, "range": [ 4, 16 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 16 } } } ], "kind": "var", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "RegularExpression", "value": "/[a-z]/y", "regex": { "pattern": "[a-z]", "flags": "y" }, "range": [ 8, 16 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0004.js000066400000000000000000000000201331122015500317360ustar00rootroot00000000000000var x = /[a-z]/uesprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0004.tree.json000066400000000000000000000106151331122015500332440ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": null, "raw": "/[a-z]/u", "regex": { "pattern": "[a-z]", "flags": "u" }, "range": [ 8, 16 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 16 } } }, "range": [ 4, 16 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 16 } } } ], "kind": "var", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "RegularExpression", "value": "/[a-z]/u", "regex": { "pattern": "[a-z]", "flags": "u" }, "range": [ 8, 16 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0005.source.js000066400000000000000000000000721331122015500332450ustar00rootroot00000000000000var source = 'var x = /[\\u{0000000000000061}-\\u{7A}]/u';esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0005.tree.json000066400000000000000000000107651331122015500332530ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": null, "raw": "/[\\u{0000000000000061}-\\u{7A}]/u", "regex": { "pattern": "[\\u{0000000000000061}-\\u{7A}]", "flags": "u" }, "range": [ 8, 40 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 40 } } }, "range": [ 4, 40 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 40 } } } ], "kind": "var", "range": [ 0, 40 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 40 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "RegularExpression", "value": "/[\\u{0000000000000061}-\\u{7A}]/u", "regex": { "pattern": "[\\u{0000000000000061}-\\u{7A}]", "flags": "u" }, "range": [ 8, 40 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 40 } } } ], "range": [ 0, 40 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 40 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0006.failure.json000066400000000000000000000001661331122015500337360ustar00rootroot00000000000000{ "index": 21, "lineNumber": 1, "column": 22, "message": "Error: Line 1: Invalid regular expression" }esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0006.source.js000066400000000000000000000000461331122015500332470ustar00rootroot00000000000000var source = 'var x = /\\u{110000}/u';esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0007.js000066400000000000000000000000201331122015500317410ustar00rootroot00000000000000var x = /[x-z]/iesprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0007.tree.json000066400000000000000000000037031331122015500332470ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ] }, "init": { "type": "Literal", "value": {}, "raw": "/[x-z]/i", "regex": { "pattern": "[x-z]", "flags": "i" }, "range": [ 8, 16 ] }, "range": [ 4, 16 ] } ], "kind": "var", "range": [ 0, 16 ] } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ] }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ] }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ] }, { "type": "RegularExpression", "value": "/[x-z]/i", "regex": { "pattern": "[x-z]", "flags": "i" }, "range": [ 8, 16 ] } ], "range": [ 0, 16 ] } esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0008.js000066400000000000000000000000201331122015500317420ustar00rootroot00000000000000var x = /[a-c]/iesprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0008.tree.json000066400000000000000000000072031331122015500332470ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": {}, "raw": "/[a-c]/i", "regex": { "pattern": "[a-c]", "flags": "i" }, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 16 } } }, "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 16 } } } ], "kind": "var", "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "RegularExpression", "value": "/[a-c]/i", "regex": { "pattern": "[a-c]", "flags": "i" }, "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 16 } } } ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0009.js000066400000000000000000000000211331122015500317440ustar00rootroot00000000000000var x = /[P QR]/iesprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0009.tree.json000066400000000000000000000106171331122015500332530ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": {}, "raw": "/[P QR]/i", "regex": { "pattern": "[P QR]", "flags": "i" }, "range": [ 8, 17 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 17 } } }, "range": [ 4, 17 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 17 } } } ], "kind": "var", "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "RegularExpression", "value": "/[P QR]/i", "regex": { "pattern": "[P QR]", "flags": "i" }, "range": [ 8, 17 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 17 } } } ], "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0010.js000066400000000000000000000000171331122015500317410ustar00rootroot00000000000000var x = /[\]/]/esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0010.tree.json000066400000000000000000000106131331122015500332370ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": {}, "raw": "/[\\]/]/", "regex": { "pattern": "[\\]/]", "flags": "" }, "range": [ 8, 15 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 15 } } }, "range": [ 4, 15 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 15 } } } ], "kind": "var", "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "RegularExpression", "value": "/[\\]/]/", "regex": { "pattern": "[\\]/]", "flags": "" }, "range": [ 8, 15 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0011.js000066400000000000000000000000221331122015500317360ustar00rootroot00000000000000var x = /foo\/bar/esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0011.tree.json000066400000000000000000000106271331122015500332450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": {}, "raw": "/foo\\/bar/", "regex": { "pattern": "foo\\/bar", "flags": "" }, "range": [ 8, 18 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 18 } } }, "range": [ 4, 18 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 18 } } } ], "kind": "var", "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "RegularExpression", "value": "/foo\\/bar/", "regex": { "pattern": "foo\\/bar", "flags": "" }, "range": [ 8, 18 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 18 } } } ], "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0012.js000066400000000000000000000000251331122015500317420ustar00rootroot00000000000000var x = /=([^=\s])+/gesprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0012.tree.json000066400000000000000000000106431331122015500332440ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": {}, "raw": "/=([^=\\s])+/g", "regex": { "pattern": "=([^=\\s])+", "flags": "g" }, "range": [ 8, 21 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 21 } } }, "range": [ 4, 21 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 21 } } } ], "kind": "var", "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "RegularExpression", "value": "/=([^=\\s])+/g", "regex": { "pattern": "=([^=\\s])+", "flags": "g" }, "range": [ 8, 21 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0013.js000066400000000000000000000000221331122015500317400ustar00rootroot00000000000000var x = /42/g.testesprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/migrated_0013.tree.json000066400000000000000000000151371331122015500332500ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "MemberExpression", "computed": false, "object": { "type": "Literal", "value": {}, "raw": "/42/g", "regex": { "pattern": "42", "flags": "g" }, "range": [ 8, 13 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 13 } } }, "property": { "type": "Identifier", "name": "test", "range": [ 14, 18 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 18 } } }, "range": [ 8, 18 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 18 } } }, "range": [ 4, 18 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 18 } } } ], "kind": "var", "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "RegularExpression", "value": "/42/g", "regex": { "pattern": "42", "flags": "g" }, "range": [ 8, 13 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ".", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "test", "range": [ 14, 18 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 18 } } } ], "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } u-flag-invalid-range-4-hex.failure.json000066400000000000000000000001671331122015500362330ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression{ "index": 21, "lineNumber": 1, "column": 22, "message": "Error: Line 1: Invalid regular expression" } u-flag-invalid-range-4-hex.js000066400000000000000000000000271331122015500342430ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expressionvar x = /[\u0063-b]/u; u-flag-invalid-range-var-hex.failure.json000066400000000000000000000001671331122015500366600ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression{ "index": 21, "lineNumber": 1, "column": 22, "message": "Error: Line 1: Invalid regular expression" } u-flag-invalid-range-var-hex.js000066400000000000000000000000271331122015500346700ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expressionvar x = /[\u{63}-b]/u; esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/u-flag-surrogate-pair.js000066400000000000000000000000521331122015500336210ustar00rootroot00000000000000var x = /[\uD834\uDF06-\uD834\uDF08a-z]/u u-flag-surrogate-pair.tree.json000066400000000000000000000110011331122015500350310ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": null, "raw": "/[\\uD834\\uDF06-\\uD834\\uDF08a-z]/u", "regex": { "pattern": "[\\uD834\\uDF06-\\uD834\\uDF08a-z]", "flags": "u" }, "range": [ 8, 41 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 41 } } }, "range": [ 4, 41 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 41 } } } ], "kind": "var", "range": [ 0, 41 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 41 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "RegularExpression", "value": "/[\\uD834\\uDF06-\\uD834\\uDF08a-z]/u", "regex": { "pattern": "[\\uD834\\uDF06-\\uD834\\uDF08a-z]", "flags": "u" }, "range": [ 8, 41 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 41 } } } ], "range": [ 0, 41 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 41 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression/u-flag-valid-range.js000066400000000000000000000000761331122015500330540ustar00rootroot00000000000000var x = /[\u{61}-b][\u0061-b][a-\u{62}][a-\u0062]\u{1ffff}/u; u-flag-valid-range.tree.json000066400000000000000000000117531331122015500342740ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/literal/regular-expression{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": null, "raw": "/[\\u{61}-b][\\u0061-b][a-\\u{62}][a-\\u0062]\\u{1ffff}/u", "regex": { "pattern": "[\\u{61}-b][\\u0061-b][a-\\u{62}][a-\\u0062]\\u{1ffff}", "flags": "u" }, "range": [ 8, 60 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 60 } } }, "range": [ 4, 60 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 60 } } } ], "kind": "var", "range": [ 0, 61 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 61 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "RegularExpression", "value": "/[\\u{61}-b][\\u0061-b][a-\\u{62}][a-\\u0062]\\u{1ffff}/u", "regex": { "pattern": "[\\u{61}-b][\\u0061-b][a-\\u{62}][a-\\u0062]\\u{1ffff}", "flags": "u" }, "range": [ 8, 60 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 60 } } }, { "range": [ 60, 61 ], "loc": { "start": { "line": 1, "column": 60 }, "end": { "line": 1, "column": 61 } }, "type": "Punctuator", "value": ";" } ], "range": [ 0, 61 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 61 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/000077500000000000000000000000001331122015500246215ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/literal/string/invalid_escaped_hex.failure.json000066400000000000000000000002021331122015500331120ustar00rootroot00000000000000{"index":6,"lineNumber":1,"column":7,"message":"Error: Line 1: Unexpected token ILLEGAL","description":"Unexpected token ILLEGAL"}esprima-4.0.1/test/fixtures/expression/primary/literal/string/invalid_escaped_hex.js000066400000000000000000000000111331122015500311250ustar00rootroot00000000000000'\u00FG' esprima-4.0.1/test/fixtures/expression/primary/literal/string/invalid_hex.failure.json000066400000000000000000000002301331122015500314270ustar00rootroot00000000000000{"index":4,"lineNumber":1,"column":5,"message":"Error: Line 1: Invalid hexadecimal escape sequence","description":"Invalid hexadecimal escape sequence"}esprima-4.0.1/test/fixtures/expression/primary/literal/string/invalid_hex.js000066400000000000000000000000071331122015500274460ustar00rootroot00000000000000'\xFG' esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0000.js000066400000000000000000000000071331122015500274070ustar00rootroot00000000000000"Hello"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0000.tree.json000066400000000000000000000032101331122015500307010ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "Hello", "raw": "\"Hello\"", "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "directive": "Hello", "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"Hello\"", "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0001.js000066400000000000000000000000261331122015500274110ustar00rootroot00000000000000"\n\r\t\v\b\f\\\'\"\0"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0001.tree.json000066400000000000000000000033671331122015500307170ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "\n\r\t\u000b\b\f\\'\"\u0000", "raw": "\"\\n\\r\\t\\v\\b\\f\\\\\\'\\\"\\0\"", "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } }, "directive": "\\n\\r\\t\\v\\b\\f\\\\\\'\\\"\\0", "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"\\n\\r\\t\\v\\b\\f\\\\\\'\\\"\\0\"", "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0002.source.js000066400000000000000000000000311331122015500307050ustar00rootroot00000000000000var source = '"\\u0061"';esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0002.tree.json000066400000000000000000000032121331122015500307050ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "a", "raw": "\"\\u0061\"", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "directive": "\\u0061", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"\\u0061\"", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } ], "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0003.js000066400000000000000000000000061331122015500274110ustar00rootroot00000000000000"\x61"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0003.tree.json000066400000000000000000000032041331122015500307070ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "a", "raw": "\"\\x61\"", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "directive": "\\x61", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"\\x61\"", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0006.js000066400000000000000000000000161331122015500274150ustar00rootroot00000000000000"Hello\nworld"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0006.tree.json000066400000000000000000000032571331122015500307220ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "Hello\nworld", "raw": "\"Hello\\nworld\"", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } }, "directive": "Hello\\nworld", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"Hello\\nworld\"", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0007.js000066400000000000000000000000161331122015500274160ustar00rootroot00000000000000"Hello\ world"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0007.tree.json000066400000000000000000000032541331122015500307200ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "Helloworld", "raw": "\"Hello\\\nworld\"", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 6 } } }, "directive": "Hello\\\nworld", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"Hello\\\nworld\"", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 6 } } } ], "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0008.js000066400000000000000000000000171331122015500274200ustar00rootroot00000000000000"Hello\02World"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0008.tree.json000066400000000000000000000032661331122015500307240ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "Hello\u0002World", "raw": "\"Hello\\02World\"", "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } }, "directive": "Hello\\02World", "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"Hello\\02World\"", "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0009.js000066400000000000000000000000201331122015500274130ustar00rootroot00000000000000"Hello\012World"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0009.tree.json000066400000000000000000000032651331122015500307240ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "Hello\nWorld", "raw": "\"Hello\\012World\"", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } }, "directive": "Hello\\012World", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"Hello\\012World\"", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0010.js000066400000000000000000000000201331122015500274030ustar00rootroot00000000000000"Hello\122World"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0010.tree.json000066400000000000000000000032641331122015500307130ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "HelloRWorld", "raw": "\"Hello\\122World\"", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } }, "directive": "Hello\\122World", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"Hello\\122World\"", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0011.js000066400000000000000000000000211331122015500274050ustar00rootroot00000000000000"Hello\0122World"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0011.tree.json000066400000000000000000000032711331122015500307120ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "Hello\n2World", "raw": "\"Hello\\0122World\"", "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } }, "directive": "Hello\\0122World", "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"Hello\\0122World\"", "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } ], "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0012.js000066400000000000000000000000201331122015500274050ustar00rootroot00000000000000"Hello\312World"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0012.tree.json000066400000000000000000000032651331122015500307160ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "HelloÊWorld", "raw": "\"Hello\\312World\"", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } }, "directive": "Hello\\312World", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"Hello\\312World\"", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0013.js000066400000000000000000000000201331122015500274060ustar00rootroot00000000000000"Hello\412World"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0013.tree.json000066400000000000000000000032651331122015500307170ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "Hello!2World", "raw": "\"Hello\\412World\"", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } }, "directive": "Hello\\412World", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"Hello\\412World\"", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0015.js000066400000000000000000000000201331122015500274100ustar00rootroot00000000000000"Hello\712World"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0015.tree.json000066400000000000000000000032651331122015500307210ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "Hello92World", "raw": "\"Hello\\712World\"", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } }, "directive": "Hello\\712World", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"Hello\\712World\"", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0016.js000066400000000000000000000000161331122015500274160ustar00rootroot00000000000000"Hello\0World"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0016.tree.json000066400000000000000000000032631331122015500307200ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "Hello\u0000World", "raw": "\"Hello\\0World\"", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } }, "directive": "Hello\\0World", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"Hello\\0World\"", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0017.js000066400000000000000000000000171331122015500274200ustar00rootroot00000000000000"Hello\ world"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0017.tree.json000066400000000000000000000032621331122015500307200ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "Helloworld", "raw": "\"Hello\\\r\nworld\"", "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 6 } } }, "directive": "Hello\\\r\nworld", "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"Hello\\\r\nworld\"", "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 6 } } } ], "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0018.js000066400000000000000000000000161331122015500274200ustar00rootroot00000000000000"Hello\1World"esprima-4.0.1/test/fixtures/expression/primary/literal/string/migrated_0018.tree.json000066400000000000000000000032631331122015500307220ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "Hello\u0001World", "raw": "\"Hello\\1World\"", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } }, "directive": "Hello\\1World", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"Hello\\1World\"", "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } esprima-4.0.1/test/fixtures/expression/primary/object/000077500000000000000000000000001331122015500231255ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/object/invalid-getter.js000066400000000000000000000000241331122015500263750ustar00rootroot00000000000000x = { get y(z) {} } esprima-4.0.1/test/fixtures/expression/primary/object/invalid-getter.tree.json000066400000000000000000000262731331122015500277060ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "z", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } } }, "generator": false, "expression": false, "async": false, "range": [ 11, 17 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 17 } } }, "kind": "get", "method": false, "shorthand": false, "range": [ 6, 17 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 17 } } } ], "range": [ 4, 19 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 19 } } }, "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } }, "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } } ], "sourceType": "script", "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } }, "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "get", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "(", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "z", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "{", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "}", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "}", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } } ], "errors": [ { "index": 14, "lineNumber": 1, "column": 15, "message": "Error: Line 1: Getter must not have any formal parameters" } ] }esprima-4.0.1/test/fixtures/expression/primary/object/invalid-setter1.js000066400000000000000000000000231331122015500264710ustar00rootroot00000000000000x = { set y() {} } esprima-4.0.1/test/fixtures/expression/primary/object/invalid-setter1.tree.json000066400000000000000000000235631331122015500300020ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 14, 16 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 16 } } }, "generator": false, "expression": false, "async": false, "range": [ 11, 16 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 16 } } }, "kind": "set", "method": false, "shorthand": false, "range": [ 6, 16 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 4, 18 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 18 } } }, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } }, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } ], "sourceType": "script", "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } }, "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "set", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "(", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ")", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "{", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "}", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "}", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } } ], "errors": [ { "index": 13, "lineNumber": 1, "column": 14, "message": "Error: Line 1: Setter must have exactly one formal parameter" } ] }esprima-4.0.1/test/fixtures/expression/primary/object/invalid-setter2.js000066400000000000000000000000271331122015500264760ustar00rootroot00000000000000x = { set y(a, b) {} } esprima-4.0.1/test/fixtures/expression/primary/object/invalid-setter2.tree.json000066400000000000000000000316031331122015500277750ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "a", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "name": "b", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 18, 20 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 20 } } }, "generator": false, "expression": false, "async": false, "range": [ 11, 20 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 20 } } }, "kind": "set", "method": false, "shorthand": false, "range": [ 6, 20 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 20 } } } ], "range": [ 4, 22 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } }, "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "set", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "(", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "a", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ",", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "b", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "}", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "}", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ], "errors": [ { "index": 17, "lineNumber": 1, "column": 18, "message": "Error: Line 1: Setter must have exactly one formal parameter" } ] }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0000.js000066400000000000000000000000061331122015500257120ustar00rootroot00000000000000x = {}esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0000.tree.json000066400000000000000000000075621331122015500272230ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [], "range": [ 4, 6 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "}", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0001.js000066400000000000000000000000071331122015500257140ustar00rootroot00000000000000x = { }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0001.tree.json000066400000000000000000000075621331122015500272240ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [], "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "}", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0002.js000066400000000000000000000000221331122015500257120ustar00rootroot00000000000000x = { answer: 42 }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0002.tree.json000066400000000000000000000167441331122015500272270ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "answer", "range": [ 6, 12 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 12 } } }, "computed": false, "value": { "type": "Literal", "value": 42, "raw": "42", "range": [ 14, 16 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 16 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 6, 16 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 4, 18 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 18 } } }, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } }, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "answer", "range": [ 6, 12 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ":", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Numeric", "value": "42", "range": [ 14, 16 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "}", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } } ], "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0003.js000066400000000000000000000000161331122015500257160ustar00rootroot00000000000000x = { if: 42 }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0003.tree.json000066400000000000000000000167211331122015500272230ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "if", "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } }, "computed": false, "value": { "type": "Literal", "value": 42, "raw": "42", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 6, 12 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 12 } } } ], "range": [ 4, 14 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 14 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "if", "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ":", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Numeric", "value": "42", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "}", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0004.js000066400000000000000000000000201331122015500257120ustar00rootroot00000000000000x = { true: 42 }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0004.tree.json000066400000000000000000000167351331122015500272310ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "true", "range": [ 6, 10 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 10 } } }, "computed": false, "value": { "type": "Literal", "value": 42, "raw": "42", "range": [ 12, 14 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 14 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 6, 14 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 4, 16 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 16 } } }, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } }, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Boolean", "value": "true", "range": [ 6, 10 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ":", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Numeric", "value": "42", "range": [ 12, 14 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "}", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0005.js000066400000000000000000000000211331122015500257140ustar00rootroot00000000000000x = { false: 42 }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0005.tree.json000066400000000000000000000167371331122015500272340ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "false", "range": [ 6, 11 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 11 } } }, "computed": false, "value": { "type": "Literal", "value": 42, "raw": "42", "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 6, 15 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 4, 17 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Boolean", "value": "false", "range": [ 6, 11 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ":", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Numeric", "value": "42", "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "}", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } } ], "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0006.js000066400000000000000000000000201331122015500257140ustar00rootroot00000000000000x = { null: 42 }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0006.tree.json000066400000000000000000000167321331122015500272300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "null", "range": [ 6, 10 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 10 } } }, "computed": false, "value": { "type": "Literal", "value": 42, "raw": "42", "range": [ 12, 14 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 14 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 6, 14 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 4, 16 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 16 } } }, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } }, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Null", "value": "null", "range": [ 6, 10 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ":", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Numeric", "value": "42", "range": [ 12, 14 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "}", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0007.js000066400000000000000000000000241331122015500257210ustar00rootroot00000000000000x = { "answer": 42 }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0007.tree.json000066400000000000000000000170271331122015500272270ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Literal", "value": "answer", "raw": "\"answer\"", "range": [ 6, 14 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 14 } } }, "computed": false, "value": { "type": "Literal", "value": 42, "raw": "42", "range": [ 16, 18 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 18 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 6, 18 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 18 } } } ], "range": [ 4, 20 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 20 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "String", "value": "\"answer\"", "range": [ 6, 14 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ":", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Numeric", "value": "42", "range": [ 16, 18 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "}", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } } ], "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0008.js000066400000000000000000000000221331122015500257200ustar00rootroot00000000000000x = { x: 1, x: 2 }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0008.tree.json000066400000000000000000000266601331122015500272330ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "computed": false, "value": { "type": "Literal", "value": 1, "raw": "1", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 6, 10 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 10 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, "computed": false, "value": { "type": "Literal", "value": 2, "raw": "2", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 12, 16 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 4, 18 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 18 } } }, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } }, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ":", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Numeric", "value": "1", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ",", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "x", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ":", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Numeric", "value": "2", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "}", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } } ], "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0009.js000066400000000000000000000000461331122015500257270ustar00rootroot00000000000000x = { get width() { return m_width } }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0009.tree.json000066400000000000000000000307431331122015500272310ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "width", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "m_width", "range": [ 27, 34 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 34 } } }, "range": [ 20, 35 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 35 } } } ], "range": [ 18, 36 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 36 } } }, "generator": false, "expression": false, "async": false, "range": [ 15, 36 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 36 } } }, "kind": "get", "method": false, "shorthand": false, "range": [ 6, 36 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 36 } } } ], "range": [ 4, 38 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 38 } } }, "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } }, "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "get", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "width", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "(", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Keyword", "value": "return", "range": [ 20, 26 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "m_width", "range": [ 27, 34 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "}", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": "}", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } } ], "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0010.js000066400000000000000000000000261331122015500257150ustar00rootroot00000000000000x = { get undef() {} }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0010.tree.json000066400000000000000000000232531331122015500272170ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "undef", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 18, 20 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 20 } } }, "generator": false, "expression": false, "async": false, "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } }, "kind": "get", "method": false, "shorthand": false, "range": [ 6, 20 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 20 } } } ], "range": [ 4, 22 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "get", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "undef", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "(", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "}", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "}", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ], "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0011.js000066400000000000000000000000231331122015500257130ustar00rootroot00000000000000x = { get if() {} }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0011.tree.json000066400000000000000000000232421331122015500272160ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "if", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } } }, "generator": false, "expression": false, "async": false, "range": [ 12, 17 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 17 } } }, "kind": "get", "method": false, "shorthand": false, "range": [ 6, 17 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 17 } } } ], "range": [ 4, 19 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 19 } } }, "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } }, "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "get", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "if", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "(", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "{", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "}", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "}", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } } ], "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0012.js000066400000000000000000000000251331122015500257160ustar00rootroot00000000000000x = { get true() {} }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0012.tree.json000066400000000000000000000232461331122015500272230ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "true", "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 17, 19 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 19 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 19 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 19 } } }, "kind": "get", "method": false, "shorthand": false, "range": [ 6, 19 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 19 } } } ], "range": [ 4, 21 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "get", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Boolean", "value": "true", "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "{", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "}", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "}", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0013.js000066400000000000000000000000261331122015500257200ustar00rootroot00000000000000x = { get false() {} }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0013.tree.json000066400000000000000000000232501331122015500272170ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "false", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 18, 20 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 20 } } }, "generator": false, "expression": false, "async": false, "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } }, "kind": "get", "method": false, "shorthand": false, "range": [ 6, 20 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 20 } } } ], "range": [ 4, 22 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "get", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Boolean", "value": "false", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "(", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "}", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "}", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ], "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0014.js000066400000000000000000000000251331122015500257200ustar00rootroot00000000000000x = { get null() {} }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0014.tree.json000066400000000000000000000232431331122015500272220ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "null", "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 17, 19 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 19 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 19 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 19 } } }, "kind": "get", "method": false, "shorthand": false, "range": [ 6, 19 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 19 } } } ], "range": [ 4, 21 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "get", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Null", "value": "null", "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "{", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "}", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "}", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0015.js000066400000000000000000000000301331122015500257150ustar00rootroot00000000000000x = { get "undef"() {} }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0015.tree.json000066400000000000000000000233351331122015500272250ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Literal", "value": "undef", "raw": "\"undef\"", "range": [ 10, 17 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 17 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 20, 22 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 22 } } }, "generator": false, "expression": false, "async": false, "range": [ 17, 22 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 22 } } }, "kind": "get", "method": false, "shorthand": false, "range": [ 6, 22 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 22 } } } ], "range": [ 4, 24 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 24 } } }, "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } }, "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "get", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "String", "value": "\"undef\"", "range": [ 10, 17 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "(", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "{", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "}", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "}", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0016.js000066400000000000000000000000231331122015500257200ustar00rootroot00000000000000x = { get 10() {} }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0016.tree.json000066400000000000000000000233131331122015500272220ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Literal", "value": 10, "raw": "10", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } } }, "generator": false, "expression": false, "async": false, "range": [ 12, 17 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 17 } } }, "kind": "get", "method": false, "shorthand": false, "range": [ 6, 17 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 17 } } } ], "range": [ 4, 19 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 19 } } }, "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } }, "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "get", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Numeric", "value": "10", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "(", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "{", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "}", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "}", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } } ], "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0017.js000066400000000000000000000000441331122015500257240ustar00rootroot00000000000000x = { set width(w) { m_width = w } }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0017.tree.json000066400000000000000000000406751331122015500272350ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "width", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "w", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "m_width", "range": [ 21, 28 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 28 } } }, "right": { "type": "Identifier", "name": "w", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, "range": [ 21, 32 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 32 } } }, "range": [ 21, 33 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 33 } } } ], "range": [ 19, 34 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 34 } } }, "generator": false, "expression": false, "async": false, "range": [ 15, 34 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 34 } } }, "kind": "set", "method": false, "shorthand": false, "range": [ 6, 34 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 34 } } } ], "range": [ 4, 36 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 36 } } }, "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } }, "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "set", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "width", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "(", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "w", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ")", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "{", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "m_width", "range": [ 21, 28 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "=", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Identifier", "value": "w", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "}", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } } ], "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0018.js000066400000000000000000000000361331122015500257260ustar00rootroot00000000000000x = { set if(w) { m_if = w } }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0018.tree.json000066400000000000000000000406561331122015500272350ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "if", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "w", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "m_if", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, "right": { "type": "Identifier", "name": "w", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, "range": [ 18, 26 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 26 } } }, "range": [ 18, 27 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 27 } } } ], "range": [ 16, 28 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 28 } } }, "generator": false, "expression": false, "async": false, "range": [ 12, 28 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 28 } } }, "kind": "set", "method": false, "shorthand": false, "range": [ 6, 28 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 28 } } } ], "range": [ 4, 30 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 30 } } }, "range": [ 0, 30 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } } }, "range": [ 0, 30 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "set", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "if", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "(", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "w", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ")", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "{", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "m_if", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "=", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Identifier", "value": "w", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "}", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "}", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } } ], "range": [ 0, 30 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0019.js000066400000000000000000000000421331122015500257240ustar00rootroot00000000000000x = { set true(w) { m_true = w } }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0019.tree.json000066400000000000000000000406661331122015500272370ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "true", "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "w", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "m_true", "range": [ 20, 26 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 26 } } }, "right": { "type": "Identifier", "name": "w", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, "range": [ 20, 30 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 30 } } }, "range": [ 20, 31 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 18, 32 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 32 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 32 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 32 } } }, "kind": "set", "method": false, "shorthand": false, "range": [ 6, 32 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 32 } } } ], "range": [ 4, 34 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 34 } } }, "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } }, "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "set", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Boolean", "value": "true", "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "w", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "value": "m_true", "range": [ 20, 26 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "=", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Identifier", "value": "w", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": "}", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } } ], "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0020.js000066400000000000000000000000441331122015500257160ustar00rootroot00000000000000x = { set false(w) { m_false = w } }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0020.tree.json000066400000000000000000000406721331122015500272240ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "false", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "w", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "m_false", "range": [ 21, 28 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 28 } } }, "right": { "type": "Identifier", "name": "w", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, "range": [ 21, 32 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 32 } } }, "range": [ 21, 33 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 33 } } } ], "range": [ 19, 34 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 34 } } }, "generator": false, "expression": false, "async": false, "range": [ 15, 34 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 34 } } }, "kind": "set", "method": false, "shorthand": false, "range": [ 6, 34 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 34 } } } ], "range": [ 4, 36 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 36 } } }, "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } }, "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "set", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Boolean", "value": "false", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "(", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "w", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ")", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "{", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "m_false", "range": [ 21, 28 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "=", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Identifier", "value": "w", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "}", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } } ], "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0021.js000066400000000000000000000000421331122015500257150ustar00rootroot00000000000000x = { set null(w) { m_null = w } }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0021.tree.json000066400000000000000000000406631331122015500272250ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "null", "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "w", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "m_null", "range": [ 20, 26 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 26 } } }, "right": { "type": "Identifier", "name": "w", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, "range": [ 20, 30 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 30 } } }, "range": [ 20, 31 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 18, 32 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 32 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 32 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 32 } } }, "kind": "set", "method": false, "shorthand": false, "range": [ 6, 32 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 32 } } } ], "range": [ 4, 34 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 34 } } }, "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } }, "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "set", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Null", "value": "null", "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "w", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "value": "m_null", "range": [ 20, 26 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "=", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Identifier", "value": "w", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": "}", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } } ], "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0022.js000066400000000000000000000000441331122015500257200ustar00rootroot00000000000000x = { set "null"(w) { m_null = w } }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0022.tree.json000066400000000000000000000407521331122015500272250ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Literal", "value": "null", "raw": "\"null\"", "range": [ 10, 16 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 16 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "w", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "m_null", "range": [ 22, 28 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 28 } } }, "right": { "type": "Identifier", "name": "w", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, "range": [ 22, 32 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 32 } } }, "range": [ 22, 33 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 33 } } } ], "range": [ 20, 34 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 34 } } }, "generator": false, "expression": false, "async": false, "range": [ 16, 34 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 34 } } }, "kind": "set", "method": false, "shorthand": false, "range": [ 6, 34 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 34 } } } ], "range": [ 4, 36 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 36 } } }, "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } }, "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "set", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "String", "value": "\"null\"", "range": [ 10, 16 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "(", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "w", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "{", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "m_null", "range": [ 22, 28 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "=", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Identifier", "value": "w", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "}", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } } ], "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0023.js000066400000000000000000000000401331122015500257150ustar00rootroot00000000000000x = { set 10(w) { m_null = w } }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0023.tree.json000066400000000000000000000407331331122015500272250ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Literal", "value": 10, "raw": "10", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "w", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "m_null", "range": [ 18, 24 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 24 } } }, "right": { "type": "Identifier", "name": "w", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, "range": [ 18, 28 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 28 } } }, "range": [ 18, 29 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 29 } } } ], "range": [ 16, 30 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 30 } } }, "generator": false, "expression": false, "async": false, "range": [ 12, 30 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 30 } } }, "kind": "set", "method": false, "shorthand": false, "range": [ 6, 30 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 30 } } } ], "range": [ 4, 32 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 32 } } }, "range": [ 0, 32 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 32 } } }, "range": [ 0, 32 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 32 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "set", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Numeric", "value": "10", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "(", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "w", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ")", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "{", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "m_null", "range": [ 18, 24 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "=", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "w", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "}", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": "}", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } } ], "range": [ 0, 32 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 32 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0024.js000066400000000000000000000000171331122015500257220ustar00rootroot00000000000000x = { get: 42 }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0024.tree.json000066400000000000000000000167301331122015500272260ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "get", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, "computed": false, "value": { "type": "Literal", "value": 42, "raw": "42", "range": [ 11, 13 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 13 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 6, 13 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 4, 15 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 15 } } }, "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } }, "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "get", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ":", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Numeric", "value": "42", "range": [ 11, 13 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "}", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0025.js000066400000000000000000000000171331122015500257230ustar00rootroot00000000000000x = { set: 43 }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0025.tree.json000066400000000000000000000167301331122015500272270ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "set", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, "computed": false, "value": { "type": "Literal", "value": 43, "raw": "43", "range": [ 11, 13 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 13 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 6, 13 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 4, 15 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 15 } } }, "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } }, "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "set", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ":", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Numeric", "value": "43", "range": [ 11, 13 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "}", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0026.js000066400000000000000000000000241331122015500257220ustar00rootroot00000000000000x = { __proto__: 2 }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0026.tree.json000066400000000000000000000167471331122015500272400ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "__proto__", "range": [ 6, 15 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 15 } } }, "computed": false, "value": { "type": "Literal", "value": 2, "raw": "2", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 6, 18 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 18 } } } ], "range": [ 4, 20 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 20 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "__proto__", "range": [ 6, 15 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ":", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Numeric", "value": "2", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "}", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } } ], "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0027.js000066400000000000000000000000251331122015500257240ustar00rootroot00000000000000x = {"__proto__": 2 }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0027.tree.json000066400000000000000000000170351331122015500272300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Literal", "value": "__proto__", "raw": "\"__proto__\"", "range": [ 5, 16 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 16 } } }, "computed": false, "value": { "type": "Literal", "value": 2, "raw": "2", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 5, 19 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 19 } } } ], "range": [ 4, 21 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "String", "value": "\"__proto__\"", "range": [ 5, 16 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ":", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Numeric", "value": "2", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "}", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0028.js000066400000000000000000000001151331122015500257250ustar00rootroot00000000000000x = { get width() { return m_width }, set width(width) { m_width = width; } }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0028.tree.json000066400000000000000000000635301331122015500272320ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "width", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "m_width", "range": [ 27, 34 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 34 } } }, "range": [ 20, 35 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 35 } } } ], "range": [ 18, 36 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 36 } } }, "generator": false, "expression": false, "async": false, "range": [ 15, 36 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 36 } } }, "kind": "get", "method": false, "shorthand": false, "range": [ 6, 36 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 36 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "width", "range": [ 42, 47 ], "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 47 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "width", "range": [ 48, 53 ], "loc": { "start": { "line": 1, "column": 48 }, "end": { "line": 1, "column": 53 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "m_width", "range": [ 57, 64 ], "loc": { "start": { "line": 1, "column": 57 }, "end": { "line": 1, "column": 64 } } }, "right": { "type": "Identifier", "name": "width", "range": [ 67, 72 ], "loc": { "start": { "line": 1, "column": 67 }, "end": { "line": 1, "column": 72 } } }, "range": [ 57, 72 ], "loc": { "start": { "line": 1, "column": 57 }, "end": { "line": 1, "column": 72 } } }, "range": [ 57, 73 ], "loc": { "start": { "line": 1, "column": 57 }, "end": { "line": 1, "column": 73 } } } ], "range": [ 55, 75 ], "loc": { "start": { "line": 1, "column": 55 }, "end": { "line": 1, "column": 75 } } }, "generator": false, "expression": false, "async": false, "range": [ 47, 75 ], "loc": { "start": { "line": 1, "column": 47 }, "end": { "line": 1, "column": 75 } } }, "kind": "set", "method": false, "shorthand": false, "range": [ 38, 75 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 75 } } } ], "range": [ 4, 77 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 77 } } }, "range": [ 0, 77 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 77 } } }, "range": [ 0, 77 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 77 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "get", "range": [ 6, 9 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "width", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "(", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Keyword", "value": "return", "range": [ 20, 26 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "m_width", "range": [ 27, 34 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "}", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": ",", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Identifier", "value": "set", "range": [ 38, 41 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 41 } } }, { "type": "Identifier", "value": "width", "range": [ 42, 47 ], "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 47 } } }, { "type": "Punctuator", "value": "(", "range": [ 47, 48 ], "loc": { "start": { "line": 1, "column": 47 }, "end": { "line": 1, "column": 48 } } }, { "type": "Identifier", "value": "width", "range": [ 48, 53 ], "loc": { "start": { "line": 1, "column": 48 }, "end": { "line": 1, "column": 53 } } }, { "type": "Punctuator", "value": ")", "range": [ 53, 54 ], "loc": { "start": { "line": 1, "column": 53 }, "end": { "line": 1, "column": 54 } } }, { "type": "Punctuator", "value": "{", "range": [ 55, 56 ], "loc": { "start": { "line": 1, "column": 55 }, "end": { "line": 1, "column": 56 } } }, { "type": "Identifier", "value": "m_width", "range": [ 57, 64 ], "loc": { "start": { "line": 1, "column": 57 }, "end": { "line": 1, "column": 64 } } }, { "type": "Punctuator", "value": "=", "range": [ 65, 66 ], "loc": { "start": { "line": 1, "column": 65 }, "end": { "line": 1, "column": 66 } } }, { "type": "Identifier", "value": "width", "range": [ 67, 72 ], "loc": { "start": { "line": 1, "column": 67 }, "end": { "line": 1, "column": 72 } } }, { "type": "Punctuator", "value": ";", "range": [ 72, 73 ], "loc": { "start": { "line": 1, "column": 72 }, "end": { "line": 1, "column": 73 } } }, { "type": "Punctuator", "value": "}", "range": [ 74, 75 ], "loc": { "start": { "line": 1, "column": 74 }, "end": { "line": 1, "column": 75 } } }, { "type": "Punctuator", "value": "}", "range": [ 76, 77 ], "loc": { "start": { "line": 1, "column": 76 }, "end": { "line": 1, "column": 77 } } } ], "range": [ 0, 77 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 77 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0029.js000066400000000000000000000000301331122015500257220ustar00rootroot00000000000000({ get i() { }, i: 42 })esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0029.tree.json000066400000000000000000000277541331122015500272430ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "i", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 11, 14 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 14 } } }, "generator": false, "expression": false, "async": false, "range": [ 8, 14 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 14 } } }, "kind": "get", "method": false, "shorthand": false, "range": [ 3, 14 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 14 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "i", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "computed": false, "value": { "type": "Literal", "value": 42, "raw": "42", "range": [ 19, 21 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 21 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 16, 21 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 1, 23 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 23 } } }, "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "{", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "get", "range": [ 3, 6 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "i", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "(", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ")", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "{", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "}", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ",", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "i", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ":", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Numeric", "value": "42", "range": [ 19, 21 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "}", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ")", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0030.js000066400000000000000000000000301331122015500257120ustar00rootroot00000000000000"use strict";x={y:1,y:1}esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0030.tree.json000066400000000000000000000323621331122015500272220ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "y", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "computed": false, "value": { "type": "Literal", "value": 1, "raw": "1", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 16, 19 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 19 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "y", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, "computed": false, "value": { "type": "Literal", "value": 1, "raw": "1", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 20, 23 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 23 } } } ], "range": [ 15, 24 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 24 } } }, "range": [ 13, 24 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 24 } } }, "range": [ 13, 24 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 24 } } } ], "sourceType": "script", "comments": [], "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "x", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "=", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "{", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "y", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ":", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Numeric", "value": "1", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ",", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "y", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ":", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Numeric", "value": "1", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "}", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0031.js000066400000000000000000000000601331122015500257160ustar00rootroot00000000000000"use strict"; var x = { get i() {}, get i() {} }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0031.tree.json000066400000000000000000000456061331122015500272300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "i", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 32, 34 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 34 } } }, "generator": false, "expression": false, "async": false, "range": [ 29, 34 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 34 } } }, "kind": "get", "method": false, "shorthand": false, "range": [ 24, 34 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 34 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "i", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 44, 46 ], "loc": { "start": { "line": 1, "column": 44 }, "end": { "line": 1, "column": 46 } } }, "generator": false, "expression": false, "async": false, "range": [ 41, 46 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 46 } } }, "kind": "get", "method": false, "shorthand": false, "range": [ 36, 46 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 46 } } } ], "range": [ 22, 48 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 48 } } }, "range": [ 18, 48 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 48 } } } ], "kind": "var", "range": [ 14, 48 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 48 } } } ], "sourceType": "script", "comments": [], "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "var", "range": [ 14, 17 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "x", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "=", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "{", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "get", "range": [ 24, 27 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 27 } } }, { "type": "Identifier", "value": "i", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "(", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": ")", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "{", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ",", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Identifier", "value": "get", "range": [ 36, 39 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 39 } } }, { "type": "Identifier", "value": "i", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } }, { "type": "Punctuator", "value": "(", "range": [ 41, 42 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 42 } } }, { "type": "Punctuator", "value": ")", "range": [ 42, 43 ], "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 43 } } }, { "type": "Punctuator", "value": "{", "range": [ 44, 45 ], "loc": { "start": { "line": 1, "column": 44 }, "end": { "line": 1, "column": 45 } } }, { "type": "Punctuator", "value": "}", "range": [ 45, 46 ], "loc": { "start": { "line": 1, "column": 45 }, "end": { "line": 1, "column": 46 } } }, { "type": "Punctuator", "value": "}", "range": [ 47, 48 ], "loc": { "start": { "line": 1, "column": 47 }, "end": { "line": 1, "column": 48 } } } ], "range": [ 0, 48 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 48 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0032.js000066400000000000000000000000531331122015500257210ustar00rootroot00000000000000"use strict"; var x = { i: 42, get i() {} }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0032.tree.json000066400000000000000000000411511331122015500272200ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "i", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, "computed": false, "value": { "type": "Literal", "value": 42, "raw": "42", "range": [ 27, 29 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 29 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 24, 29 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 29 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "i", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 39, 41 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 41 } } }, "generator": false, "expression": false, "async": false, "range": [ 36, 41 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 41 } } }, "kind": "get", "method": false, "shorthand": false, "range": [ 31, 41 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 41 } } } ], "range": [ 22, 43 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 43 } } }, "range": [ 18, 43 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 43 } } } ], "kind": "var", "range": [ 14, 43 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 43 } } } ], "sourceType": "script", "comments": [], "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "var", "range": [ 14, 17 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "x", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "=", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "{", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "i", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ":", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Numeric", "value": "42", "range": [ 27, 29 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": ",", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Identifier", "value": "get", "range": [ 31, 34 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 34 } } }, { "type": "Identifier", "value": "i", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": "(", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": ")", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": "{", "range": [ 39, 40 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 40 } } }, { "type": "Punctuator", "value": "}", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } }, { "type": "Punctuator", "value": "}", "range": [ 42, 43 ], "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 43 } } } ], "range": [ 0, 43 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 43 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0033.js000066400000000000000000000000541331122015500257230ustar00rootroot00000000000000"use strict"; var x = { set i(x) {}, i: 42 }esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0033.tree.json000066400000000000000000000440001331122015500272150ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "i", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "x", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 33, 35 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 35 } } }, "generator": false, "expression": false, "async": false, "range": [ 29, 35 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 35 } } }, "kind": "set", "method": false, "shorthand": false, "range": [ 24, 35 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 35 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "i", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, "computed": false, "value": { "type": "Literal", "value": 42, "raw": "42", "range": [ 40, 42 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 42 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 37, 42 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 42 } } } ], "range": [ 22, 44 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 44 } } }, "range": [ 18, 44 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 44 } } } ], "kind": "var", "range": [ 14, 44 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 44 } } } ], "sourceType": "script", "comments": [], "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "var", "range": [ 14, 17 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "x", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "=", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "{", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "set", "range": [ 24, 27 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 27 } } }, { "type": "Identifier", "value": "i", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "(", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Identifier", "value": "x", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": ")", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "{", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "}", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": ",", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Identifier", "value": "i", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": ":", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, { "type": "Numeric", "value": "42", "range": [ 40, 42 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 42 } } }, { "type": "Punctuator", "value": "}", "range": [ 43, 44 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 44 } } } ], "range": [ 0, 44 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 44 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0034.js000066400000000000000000000000131331122015500257170ustar00rootroot00000000000000({[a](){}})esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0034.tree.json000066400000000000000000000211531331122015500272220ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "a", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, "computed": true, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, "generator": false, "expression": false, "async": false, "range": [ 5, 9 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 9 } } }, "kind": "init", "method": true, "shorthand": false, "range": [ 2, 9 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 1, 10 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 10 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "{", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "[", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "a", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "]", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": ")", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "}", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "}", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ")", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0035.js000066400000000000000000000000161331122015500257230ustar00rootroot00000000000000({[a]:()=>{}})esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0035.tree.json000066400000000000000000000226621331122015500272310ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "a", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, "computed": true, "value": { "type": "ArrowFunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, "generator": false, "expression": false, "async": false, "range": [ 6, 12 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 12 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 2, 12 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 12 } } } ], "range": [ 1, 13 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "{", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "[", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "a", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "]", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ":", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ")", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "=>", "range": [ 8, 10 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "{", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "}", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "}", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0036.js000066400000000000000000000000441331122015500257250ustar00rootroot00000000000000({["__proto__"]:0, ["__proto__"]:0})esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0036.tree.json000066400000000000000000000271471331122015500272350ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Literal", "value": "__proto__", "raw": "\"__proto__\"", "range": [ 3, 14 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 14 } } }, "computed": true, "value": { "type": "Literal", "value": 0, "raw": "0", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 2, 17 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 17 } } }, { "type": "Property", "key": { "type": "Literal", "value": "__proto__", "raw": "\"__proto__\"", "range": [ 20, 31 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 31 } } }, "computed": true, "value": { "type": "Literal", "value": 0, "raw": "0", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 19, 34 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 34 } } } ], "range": [ 1, 35 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 35 } } }, "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "{", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "[", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "String", "value": "\"__proto__\"", "range": [ 3, 14 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "]", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ":", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Numeric", "value": "0", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ",", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "[", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "String", "value": "\"__proto__\"", "range": [ 20, 31 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "]", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": ":", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Numeric", "value": "0", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "}", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": ")", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } } ], "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0037.js000066400000000000000000000000131331122015500257220ustar00rootroot00000000000000({"[": 42})esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0037.tree.json000066400000000000000000000142351331122015500272300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Literal", "value": "[", "raw": "\"[\"", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, "computed": false, "value": { "type": "Literal", "value": 42, "raw": "42", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 2, 9 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 1, 10 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 10 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "{", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "String", "value": "\"[\"", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ":", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Numeric", "value": "42", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "}", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ")", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0038.js000066400000000000000000000000201331122015500257210ustar00rootroot00000000000000({set x(a=0){}})esprima-4.0.1/test/fixtures/expression/primary/object/migrated_0038.tree.json000066400000000000000000000301121331122015500272210ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "AssignmentPattern", "left": { "type": "Identifier", "name": "a", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "range": [ 8, 11 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 11 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 12, 14 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 14 } } }, "generator": false, "expression": false, "async": false, "range": [ 7, 14 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 14 } } }, "kind": "set", "method": false, "shorthand": false, "range": [ 2, 14 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 1, 15 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 15 } } }, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } }, "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "{", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "set", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "(", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "a", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "=", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Numeric", "value": "0", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "}", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "}", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ] }esprima-4.0.1/test/fixtures/expression/primary/other/000077500000000000000000000000001331122015500230005ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/primary/other/migrated_0000.js000066400000000000000000000000051331122015500255640ustar00rootroot00000000000000this esprima-4.0.1/test/fixtures/expression/primary/other/migrated_0000.tree.json000066400000000000000000000030431331122015500270640ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ThisExpression", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "this", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } esprima-4.0.1/test/fixtures/expression/primary/other/migrated_0001.js000066400000000000000000000000051331122015500255650ustar00rootroot00000000000000null esprima-4.0.1/test/fixtures/expression/primary/other/migrated_0001.tree.json000066400000000000000000000031271331122015500270700ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": null, "raw": "null", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "sourceType": "script", "tokens": [ { "type": "Null", "value": "null", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } esprima-4.0.1/test/fixtures/expression/primary/other/migrated_0002.js000066400000000000000000000000111331122015500255630ustar00rootroot00000000000000 42 esprima-4.0.1/test/fixtures/expression/primary/other/migrated_0002.tree.json000066400000000000000000000031241331122015500270660ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 42, "raw": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 6 } } }, "range": [ 5, 7 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "42", "range": [ 5, 7 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 6 } } } ], "range": [ 5, 7 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/primary/other/migrated_0003.js000066400000000000000000000000141331122015500255670ustar00rootroot00000000000000(1 + 2 ) * 3esprima-4.0.1/test/fixtures/expression/primary/other/migrated_0003.tree.json000066400000000000000000000145751331122015500271030ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "*", "left": { "type": "BinaryExpression", "operator": "+", "left": { "type": "Literal", "value": 1, "raw": "1", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, "right": { "type": "Literal", "value": 2, "raw": "2", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 1, 6 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 6 } } }, "right": { "type": "Literal", "value": 3, "raw": "3", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Numeric", "value": "1", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "+", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Numeric", "value": "2", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": ")", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "*", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Numeric", "value": "3", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } } ], "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } } esprima-4.0.1/test/fixtures/expression/relational/000077500000000000000000000000001331122015500223265ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/relational/migrated_0000.js000066400000000000000000000000051331122015500251120ustar00rootroot00000000000000x < yesprima-4.0.1/test/fixtures/expression/relational/migrated_0000.tree.json000066400000000000000000000067151331122015500264230ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "<", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/expression/relational/migrated_0001.js000066400000000000000000000000051331122015500251130ustar00rootroot00000000000000x > yesprima-4.0.1/test/fixtures/expression/relational/migrated_0001.tree.json000066400000000000000000000067151331122015500264240ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": ">", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": ">", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/expression/relational/migrated_0002.js000066400000000000000000000000061331122015500251150ustar00rootroot00000000000000x <= yesprima-4.0.1/test/fixtures/expression/relational/migrated_0002.tree.json000066400000000000000000000067171331122015500264270ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "<=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "<=", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/relational/migrated_0003.js000066400000000000000000000000061331122015500251160ustar00rootroot00000000000000x >= yesprima-4.0.1/test/fixtures/expression/relational/migrated_0003.tree.json000066400000000000000000000067171331122015500264300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": ">=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": ">=", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/relational/migrated_0004.js000066400000000000000000000000061331122015500251170ustar00rootroot00000000000000x in yesprima-4.0.1/test/fixtures/expression/relational/migrated_0004.tree.json000066400000000000000000000067141331122015500264260ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "in", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "in", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "y", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/relational/migrated_0005.js000066400000000000000000000000161331122015500251210ustar00rootroot00000000000000x instanceof yesprima-4.0.1/test/fixtures/expression/relational/migrated_0005.tree.json000066400000000000000000000067541331122015500264330ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "instanceof", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } }, "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "instanceof", "range": [ 2, 12 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "y", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 0, 14 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 14 } } } esprima-4.0.1/test/fixtures/expression/relational/migrated_0006.js000066400000000000000000000000111331122015500251150ustar00rootroot00000000000000x < y < zesprima-4.0.1/test/fixtures/expression/relational/migrated_0006.tree.json000066400000000000000000000127561331122015500264330ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "BinaryExpression", "operator": "<", "left": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "<", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "y", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "<", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "z", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/expression/unary/000077500000000000000000000000001331122015500213325ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/expression/unary/migrated_0000.js000066400000000000000000000000031331122015500241140ustar00rootroot00000000000000++xesprima-4.0.1/test/fixtures/expression/unary/migrated_0000.tree.json000066400000000000000000000050571331122015500254250ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "x", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, "prefix": true, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "++", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "x", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } } ], "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } esprima-4.0.1/test/fixtures/expression/unary/migrated_0001.js000066400000000000000000000000031331122015500241150ustar00rootroot00000000000000--xesprima-4.0.1/test/fixtures/expression/unary/migrated_0001.tree.json000066400000000000000000000050571331122015500254260ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "--", "argument": { "type": "Identifier", "name": "x", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, "prefix": true, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "--", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "x", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } } ], "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } esprima-4.0.1/test/fixtures/expression/unary/migrated_0002.js000066400000000000000000000000061331122015500241210ustar00rootroot00000000000000++evalesprima-4.0.1/test/fixtures/expression/unary/migrated_0002.tree.json000066400000000000000000000050651331122015500254260ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "eval", "range": [ 2, 6 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 6 } } }, "prefix": true, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "++", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "eval", "range": [ 2, 6 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/unary/migrated_0003.js000066400000000000000000000000061331122015500241220ustar00rootroot00000000000000--evalesprima-4.0.1/test/fixtures/expression/unary/migrated_0003.tree.json000066400000000000000000000050651331122015500254270ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "--", "argument": { "type": "Identifier", "name": "eval", "range": [ 2, 6 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 6 } } }, "prefix": true, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "--", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "eval", "range": [ 2, 6 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/unary/migrated_0004.js000066400000000000000000000000131331122015500241210ustar00rootroot00000000000000++argumentsesprima-4.0.1/test/fixtures/expression/unary/migrated_0004.tree.json000066400000000000000000000051111331122015500254200ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "arguments", "range": [ 2, 11 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 11 } } }, "prefix": true, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "++", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "arguments", "range": [ 2, 11 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/expression/unary/migrated_0005.js000066400000000000000000000000131331122015500241220ustar00rootroot00000000000000--argumentsesprima-4.0.1/test/fixtures/expression/unary/migrated_0005.tree.json000066400000000000000000000051111331122015500254210ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "--", "argument": { "type": "Identifier", "name": "arguments", "range": [ 2, 11 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 11 } } }, "prefix": true, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "--", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "arguments", "range": [ 2, 11 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/expression/unary/migrated_0006.js000066400000000000000000000000021331122015500241210ustar00rootroot00000000000000+xesprima-4.0.1/test/fixtures/expression/unary/migrated_0006.tree.json000066400000000000000000000050541331122015500254300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UnaryExpression", "operator": "+", "argument": { "type": "Identifier", "name": "x", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, "prefix": true, "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "+", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Identifier", "value": "x", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } } ], "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } esprima-4.0.1/test/fixtures/expression/unary/migrated_0007.js000066400000000000000000000000021331122015500241220ustar00rootroot00000000000000-xesprima-4.0.1/test/fixtures/expression/unary/migrated_0007.tree.json000066400000000000000000000050541331122015500254310ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UnaryExpression", "operator": "-", "argument": { "type": "Identifier", "name": "x", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, "prefix": true, "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "-", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Identifier", "value": "x", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } } ], "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } esprima-4.0.1/test/fixtures/expression/unary/migrated_0008.js000066400000000000000000000000021331122015500241230ustar00rootroot00000000000000~xesprima-4.0.1/test/fixtures/expression/unary/migrated_0008.tree.json000066400000000000000000000050541331122015500254320ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UnaryExpression", "operator": "~", "argument": { "type": "Identifier", "name": "x", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, "prefix": true, "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "~", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Identifier", "value": "x", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } } ], "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } esprima-4.0.1/test/fixtures/expression/unary/migrated_0009.js000066400000000000000000000000021331122015500241240ustar00rootroot00000000000000!xesprima-4.0.1/test/fixtures/expression/unary/migrated_0009.tree.json000066400000000000000000000050541331122015500254330ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UnaryExpression", "operator": "!", "argument": { "type": "Identifier", "name": "x", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, "prefix": true, "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "!", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Identifier", "value": "x", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } } ], "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } esprima-4.0.1/test/fixtures/expression/unary/migrated_0010.js000066400000000000000000000000061331122015500241200ustar00rootroot00000000000000void xesprima-4.0.1/test/fixtures/expression/unary/migrated_0010.tree.json000066400000000000000000000050571331122015500254260ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UnaryExpression", "operator": "void", "argument": { "type": "Identifier", "name": "x", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "prefix": true, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "void", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "x", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/expression/unary/migrated_0011.js000066400000000000000000000000101331122015500241140ustar00rootroot00000000000000delete xesprima-4.0.1/test/fixtures/expression/unary/migrated_0011.tree.json000066400000000000000000000050631331122015500254240ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UnaryExpression", "operator": "delete", "argument": { "type": "Identifier", "name": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, "prefix": true, "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "delete", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } } ], "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } esprima-4.0.1/test/fixtures/expression/unary/migrated_0012.js000066400000000000000000000000101331122015500241150ustar00rootroot00000000000000typeof xesprima-4.0.1/test/fixtures/expression/unary/migrated_0012.tree.json000066400000000000000000000050631331122015500254250ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UnaryExpression", "operator": "typeof", "argument": { "type": "Identifier", "name": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, "prefix": true, "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "typeof", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } } ], "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } esprima-4.0.1/test/fixtures/invalid-syntax/000077500000000000000000000000001331122015500207475ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-00.failure.json000066400000000000000000000001761331122015500243740ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Invalid hexadecimal escape sequence" } esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-00.js000066400000000000000000000000061331122015500224010ustar00rootroot00000000000000"\x"; esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-01.failure.json000066400000000000000000000001761331122015500243750ustar00rootroot00000000000000{ "index": 4, "lineNumber": 1, "column": 5, "message": "Error: Line 1: Invalid hexadecimal escape sequence" } esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-01.js000066400000000000000000000000071331122015500224030ustar00rootroot00000000000000"\x0"; esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-02.failure.json000066400000000000000000000001761331122015500243760ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Invalid hexadecimal escape sequence" } esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-02.js000066400000000000000000000000071331122015500224040ustar00rootroot00000000000000"\xx"; esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-03.failure.json000066400000000000000000000001631331122015500243730ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" } esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-03.js000066400000000000000000000000061331122015500224040ustar00rootroot00000000000000"\u"; esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-04.failure.json000066400000000000000000000001631331122015500243740ustar00rootroot00000000000000{ "index": 4, "lineNumber": 1, "column": 5, "message": "Error: Line 1: Unexpected token ILLEGAL" } esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-04.js000066400000000000000000000000071331122015500224060ustar00rootroot00000000000000"\u0"; esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-05.failure.json000066400000000000000000000001631331122015500243750ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" } esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-05.js000066400000000000000000000000071331122015500224070ustar00rootroot00000000000000"\ux"; esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-06.failure.json000066400000000000000000000001631331122015500243760ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Unexpected token ILLEGAL" } esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-06.js000066400000000000000000000000101331122015500224020ustar00rootroot00000000000000"\u00"; esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-07.failure.json000066400000000000000000000001631331122015500243770ustar00rootroot00000000000000{ "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Unexpected token ILLEGAL" } esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-07.js000066400000000000000000000000111331122015500224040ustar00rootroot00000000000000"\u000"; esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-08.failure.json000066400000000000000000000001631331122015500244000ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" } esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-08.js000066400000000000000000000000061331122015500224110ustar00rootroot00000000000000"\8"; esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-09.failure.json000066400000000000000000000001631331122015500244010ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" } esprima-4.0.1/test/fixtures/invalid-syntax/GH-1106-09.js000066400000000000000000000000061331122015500224120ustar00rootroot00000000000000"\9"; esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0000.failure.json000066400000000000000000000001611331122015500255210ustar00rootroot00000000000000{ "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0000.js000066400000000000000000000000011331122015500235270ustar00rootroot00000000000000{esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0001.failure.json000066400000000000000000000001541331122015500255240ustar00rootroot00000000000000{ "index": 0, "lineNumber": 1, "column": 1, "message": "Error: Line 1: Unexpected token }" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0001.js000066400000000000000000000000011331122015500235300ustar00rootroot00000000000000}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0002.failure.json000066400000000000000000000001621331122015500255240ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0002.js000066400000000000000000000000031331122015500235330ustar00rootroot000000000000003eaesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0003.failure.json000066400000000000000000000001621331122015500255250ustar00rootroot00000000000000{ "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0003.js000066400000000000000000000000061331122015500235370ustar00rootroot000000000000003in []esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0004.failure.json000066400000000000000000000001621331122015500255260ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0004.js000066400000000000000000000000021331122015500235340ustar00rootroot000000000000003eesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0005.failure.json000066400000000000000000000001621331122015500255270ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0005.js000066400000000000000000000000031331122015500235360ustar00rootroot000000000000003e+esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0006.failure.json000066400000000000000000000001621331122015500255300ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0006.js000066400000000000000000000000031331122015500235370ustar00rootroot000000000000003e-esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0007.failure.json000066400000000000000000000001621331122015500255310ustar00rootroot00000000000000{ "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0007.js000066400000000000000000000000021331122015500235370ustar00rootroot000000000000003xesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0008.failure.json000066400000000000000000000001621331122015500255320ustar00rootroot00000000000000{ "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0008.js000066400000000000000000000000031331122015500235410ustar00rootroot000000000000003x0esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0009.failure.json000066400000000000000000000001621331122015500255330ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0009.js000066400000000000000000000000021331122015500235410ustar00rootroot000000000000000xesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0010.failure.json000066400000000000000000000001621331122015500255230ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0010.js000066400000000000000000000000031331122015500235320ustar00rootroot0000000000000001aesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0011.failure.json000066400000000000000000000001621331122015500255240ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0011.js000066400000000000000000000000041331122015500235340ustar00rootroot000000000000000o1aesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0012.failure.json000066400000000000000000000001621331122015500255250ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0012.js000066400000000000000000000000021331122015500235330ustar00rootroot000000000000000oesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0013.failure.json000066400000000000000000000001621331122015500255260ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0013.js000066400000000000000000000000021331122015500235340ustar00rootroot000000000000000Oesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0014.failure.json000066400000000000000000000001621331122015500255270ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0014.js000066400000000000000000000000031331122015500235360ustar00rootroot000000000000000o9esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0015.failure.json000066400000000000000000000001621331122015500255300ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0015.js000066400000000000000000000000041331122015500235400ustar00rootroot000000000000000o18esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0016.failure.json000066400000000000000000000001621331122015500255310ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0016.js000066400000000000000000000000041331122015500235410ustar00rootroot000000000000000O1aesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0017.failure.json000066400000000000000000000001621331122015500255320ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0017.js000066400000000000000000000000021331122015500235400ustar00rootroot000000000000000besprima-4.0.1/test/fixtures/invalid-syntax/migrated_0018.failure.json000066400000000000000000000001621331122015500255330ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0018.js000066400000000000000000000000041331122015500235430ustar00rootroot000000000000000b1aesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0019.failure.json000066400000000000000000000001621331122015500255340ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0019.js000066400000000000000000000000031331122015500235430ustar00rootroot000000000000000b9esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0020.failure.json000066400000000000000000000001621331122015500255240ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0020.js000066400000000000000000000000041331122015500235340ustar00rootroot000000000000000b18esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0021.failure.json000066400000000000000000000001621331122015500255250ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0021.js000066400000000000000000000000041331122015500235350ustar00rootroot000000000000000b12esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0022.failure.json000066400000000000000000000001621331122015500255260ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0022.js000066400000000000000000000000021331122015500235340ustar00rootroot000000000000000Besprima-4.0.1/test/fixtures/invalid-syntax/migrated_0023.failure.json000066400000000000000000000001621331122015500255270ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0023.js000066400000000000000000000000041331122015500235370ustar00rootroot000000000000000B1aesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0024.failure.json000066400000000000000000000001621331122015500255300ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0024.js000066400000000000000000000000031331122015500235370ustar00rootroot000000000000000B9esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0025.failure.json000066400000000000000000000001621331122015500255310ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0025.js000066400000000000000000000000041331122015500235410ustar00rootroot000000000000000B18esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0026.failure.json000066400000000000000000000001621331122015500255320ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0026.js000066400000000000000000000000041331122015500235420ustar00rootroot000000000000000B12esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0027.failure.json000066400000000000000000000001621331122015500255330ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0027.js000066400000000000000000000000031331122015500235420ustar00rootroot000000000000000O9esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0028.failure.json000066400000000000000000000001621331122015500255340ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0028.js000066400000000000000000000000041331122015500235440ustar00rootroot000000000000000O18esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0029.failure.json000066400000000000000000000001621331122015500255350ustar00rootroot00000000000000{ "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0029.js000066400000000000000000000000051331122015500235460ustar00rootroot000000000000003in[]esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0030.failure.json000066400000000000000000000001621331122015500255250ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0030.js000066400000000000000000000000071331122015500235400ustar00rootroot000000000000000x3in[]esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0031.failure.json000066400000000000000000000001631331122015500255270ustar00rootroot00000000000000{ "index": 0, "lineNumber": 1, "column": 1, "message": "Error: Line 1: Unexpected token ILLEGAL" } esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0031.js000066400000000000000000000000151331122015500235400ustar00rootroot00000000000000"Hello World"esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0032.failure.json000066400000000000000000000001621331122015500255270ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0032.js000066400000000000000000000000021331122015500235350ustar00rootroot00000000000000x\esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0033.failure.json000066400000000000000000000001621331122015500255300ustar00rootroot00000000000000{ "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0033.source.js000066400000000000000000000000301331122015500250360ustar00rootroot00000000000000var source = 'x\\u005c';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0034.failure.json000066400000000000000000000001621331122015500255310ustar00rootroot00000000000000{ "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0034.source.js000066400000000000000000000000301331122015500250370ustar00rootroot00000000000000var source = 'x\\u002a';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0035.failure.json000066400000000000000000000001661331122015500255360ustar00rootroot00000000000000{ "index": 13, "lineNumber": 1, "column": 14, "message": "Error: Line 1: Invalid regular expression" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0035.js000066400000000000000000000000151331122015500235440ustar00rootroot00000000000000var x = /(s/gesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0036.failure.json000066400000000000000000000001621331122015500255330ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0036.source.js000066400000000000000000000000241331122015500250440ustar00rootroot00000000000000var source = 'a\\u';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0037.failure.json000066400000000000000000000001621331122015500255340ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0037.source.js000066400000000000000000000000241331122015500250450ustar00rootroot00000000000000var source = '\\ua';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0038.failure.json000066400000000000000000000001771331122015500255430ustar00rootroot00000000000000{ "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Invalid regular expression: missing /" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0038.js000066400000000000000000000000011331122015500235420ustar00rootroot00000000000000/esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0039.failure.json000066400000000000000000000001771331122015500255440ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Invalid regular expression: missing /" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0039.js000066400000000000000000000000051331122015500235470ustar00rootroot00000000000000/testesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0040.failure.json000066400000000000000000000001771331122015500255340ustar00rootroot00000000000000{ "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Invalid regular expression: missing /" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0040.js000066400000000000000000000000071331122015500235410ustar00rootroot00000000000000/test /esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0041.failure.json000066400000000000000000000001641331122015500255310ustar00rootroot00000000000000{ "index": 17, "lineNumber": 1, "column": 18, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0041.source.js000066400000000000000000000000431331122015500250410ustar00rootroot00000000000000var source = 'var x = /[a-z]/\\ux';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0042.failure.json000066400000000000000000000002011331122015500255220ustar00rootroot00000000000000{ "index": 14, "lineNumber": 1, "column": 15, "message": "Error: Line 1: Invalid regular expression: missing /" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0042.source.js000066400000000000000000000000451331122015500250440ustar00rootroot00000000000000var source = 'var x = /[a-z\n]/\\ux';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0043.failure.json000066400000000000000000000001641331122015500255330ustar00rootroot00000000000000{ "index": 16, "lineNumber": 1, "column": 17, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0043.source.js000066400000000000000000000000451331122015500250450ustar00rootroot00000000000000var source = 'var x = /[a-z]/\\\\ux';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0044.failure.json000066400000000000000000000001641331122015500255340ustar00rootroot00000000000000{ "index": 17, "lineNumber": 1, "column": 18, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0044.source.js000066400000000000000000000000511331122015500250430ustar00rootroot00000000000000var source = 'var x = /[P QR]/\\\\u0067';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0045.failure.json000066400000000000000000000001761331122015500255400ustar00rootroot00000000000000{ "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Invalid left-hand side in assignment" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0045.js000066400000000000000000000000051331122015500235440ustar00rootroot000000000000003 = 4esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0046.failure.json000066400000000000000000000001761331122015500255410ustar00rootroot00000000000000{ "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Invalid left-hand side in assignment" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0046.js000066400000000000000000000000121331122015500235430ustar00rootroot00000000000000func() = 4esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0047.failure.json000066400000000000000000000001761331122015500255420ustar00rootroot00000000000000{ "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Invalid left-hand side in assignment" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0047.js000066400000000000000000000000141331122015500235460ustar00rootroot00000000000000(1 + 1) = 10esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0048.failure.json000066400000000000000000000001641331122015500255400ustar00rootroot00000000000000{ "index": 11, "lineNumber": 1, "column": 12, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0048.source.js000066400000000000000000000000351331122015500250510ustar00rootroot00000000000000var source = '"\\u{110000}"';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0049.failure.json000066400000000000000000000001621331122015500255370ustar00rootroot00000000000000{ "index": 4, "lineNumber": 1, "column": 5, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0049.source.js000066400000000000000000000000271331122015500250530ustar00rootroot00000000000000var source = '"\\u{}"';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0050.failure.json000066400000000000000000000001631331122015500255300ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0050.source.js000066400000000000000000000000321331122015500250370ustar00rootroot00000000000000var source = '"\\u{FFFF"';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0051.failure.json000066400000000000000000000001621331122015500255300ustar00rootroot00000000000000{ "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0051.source.js000066400000000000000000000000321331122015500250400ustar00rootroot00000000000000var source = '"\\u{FFZ}"';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0052.failure.json000066400000000000000000000001761331122015500255360ustar00rootroot00000000000000{ "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Invalid left-hand side in assignment" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0052.js000066400000000000000000000000031331122015500235400ustar00rootroot000000000000001++esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0053.failure.json000066400000000000000000000001761331122015500255370ustar00rootroot00000000000000{ "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Invalid left-hand side in assignment" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0053.js000066400000000000000000000000031331122015500235410ustar00rootroot000000000000001--esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0054.failure.json000066400000000000000000000001761331122015500255400ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Invalid left-hand side in assignment" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0054.js000066400000000000000000000000031331122015500235420ustar00rootroot00000000000000++1esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0055.failure.json000066400000000000000000000001761331122015500255410ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Invalid left-hand side in assignment" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0055.js000066400000000000000000000000031331122015500235430ustar00rootroot00000000000000--1esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0056.failure.json000066400000000000000000000001741331122015500255400ustar00rootroot00000000000000{ "index": 11, "lineNumber": 1, "column": 12, "message": "Error: Line 1: Invalid left-hand side in for-in" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0056.js000066400000000000000000000000401331122015500235450ustar00rootroot00000000000000for((1 + 1) in list) process(x);esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0057.failure.json000066400000000000000000000001611331122015500255350ustar00rootroot00000000000000{ "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0057.js000066400000000000000000000000011331122015500235430ustar00rootroot00000000000000[esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0058.failure.json000066400000000000000000000001611331122015500255360ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0058.js000066400000000000000000000000021331122015500235450ustar00rootroot00000000000000[,esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0059.failure.json000066400000000000000000000001611331122015500255370ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0059.js000066400000000000000000000000051331122015500235510ustar00rootroot000000000000001 + {esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0060.failure.json000066400000000000000000000001631331122015500255310ustar00rootroot00000000000000{ "index": 10, "lineNumber": 1, "column": 11, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0060.js000066400000000000000000000000121331122015500235370ustar00rootroot000000000000001 + { t:t esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0061.failure.json000066400000000000000000000001631331122015500255320ustar00rootroot00000000000000{ "index": 10, "lineNumber": 1, "column": 11, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0061.js000066400000000000000000000000121331122015500235400ustar00rootroot000000000000001 + { t:t,esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0062.failure.json000066400000000000000000000002011331122015500255240ustar00rootroot00000000000000{ "index": 10, "lineNumber": 1, "column": 11, "message": "Error: Line 1: Invalid regular expression: missing /" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0062.js000066400000000000000000000000131331122015500235420ustar00rootroot00000000000000var x = / /esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0063.failure.json000066400000000000000000000001631331122015500255340ustar00rootroot00000000000000{ "index": 8, "lineNumber": 1, "column": 9, "message": "Error: Line 1: Unexpected token ILLEGAL" } esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0063.js000066400000000000000000000000121331122015500235420ustar00rootroot00000000000000var x = " esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0064.failure.json000066400000000000000000000001551331122015500255360ustar00rootroot00000000000000{ "index": 4, "lineNumber": 1, "column": 5, "message": "Error: Line 1: Unexpected token if" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0064.js000066400000000000000000000000131331122015500235440ustar00rootroot00000000000000var if = 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0065.failure.json000066400000000000000000000001621331122015500255350ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0065.js000066400000000000000000000000071331122015500235500ustar00rootroot00000000000000i #= 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0066.failure.json000066400000000000000000000001761331122015500255430ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Invalid left-hand side in assignment" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0066.js000066400000000000000000000000121331122015500235450ustar00rootroot00000000000000i + 2 = 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0067.failure.json000066400000000000000000000001761331122015500255440ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Invalid left-hand side in assignment" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0067.js000066400000000000000000000000071331122015500235520ustar00rootroot00000000000000+i = 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0068.failure.json000066400000000000000000000001611331122015500255370ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0068.js000066400000000000000000000000051331122015500235510ustar00rootroot000000000000001 + (esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0069.failure.json000066400000000000000000000001611331122015500255400ustar00rootroot00000000000000{ "index": 4, "lineNumber": 4, "column": 2, "message": "Error: Line 4: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0069.js000066400000000000000000000000041331122015500235510ustar00rootroot00000000000000 {esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0070.failure.json000066400000000000000000000001551331122015500255330ustar00rootroot00000000000000{ "index": 30, "lineNumber": 4, "column": 1, "message": "Error: Line 4: Unexpected token )" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0070.js000066400000000000000000000000371331122015500235470ustar00rootroot00000000000000 /* Some multiline comment */ )esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0071.failure.json000066400000000000000000000001531331122015500255320ustar00rootroot00000000000000{ "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Unexpected number" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0071.js000066400000000000000000000000111331122015500235400ustar00rootroot00000000000000{ set 1 }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0072.failure.json000066400000000000000000000001531331122015500255330ustar00rootroot00000000000000{ "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Unexpected number" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0072.js000066400000000000000000000000111331122015500235410ustar00rootroot00000000000000{ get 2 }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0073.failure.json000066400000000000000000000001571331122015500255400ustar00rootroot00000000000000{ "index": 10, "lineNumber": 1, "column": 11, "message": "Error: Line 1: Unexpected token if" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0073.js000066400000000000000000000000241331122015500235460ustar00rootroot00000000000000({ set: s(if) { } })esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0074.failure.json000066400000000000000000000001551331122015500255370ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Unexpected token ." }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0074.js000066400000000000000000000000221331122015500235450ustar00rootroot00000000000000({ set s(.) { } })esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0076.failure.json000066400000000000000000000001561331122015500255420ustar00rootroot00000000000000{ "index": 12, "lineNumber": 1, "column": 13, "message": "Error: Line 1: Unexpected token {" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0076.js000066400000000000000000000000221331122015500235470ustar00rootroot00000000000000({ set: s() { } })esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0077.failure.json000066400000000000000000000001561331122015500255430ustar00rootroot00000000000000{ "index": 16, "lineNumber": 1, "column": 17, "message": "Error: Line 1: Unexpected token {" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0077.js000066400000000000000000000000261331122015500235540ustar00rootroot00000000000000({ set: s(a, b) { } })esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0078.failure.json000066400000000000000000000001561331122015500255440ustar00rootroot00000000000000{ "index": 13, "lineNumber": 1, "column": 14, "message": "Error: Line 1: Unexpected token {" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0078.js000066400000000000000000000000231331122015500235520ustar00rootroot00000000000000({ get: g(d) { } })esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0080.failure.json000066400000000000000000000001541331122015500255330ustar00rootroot00000000000000{ "index": 4, "lineNumber": 1, "column": 5, "message": "Error: Line 1: Unexpected token ," }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0080.js000066400000000000000000000000131331122015500235420ustar00rootroot00000000000000({[a,b]:0})esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0081.failure.json000066400000000000000000000001541331122015500255340ustar00rootroot00000000000000{ "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Unexpected token ," }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0081.js000066400000000000000000000000161331122015500235460ustar00rootroot00000000000000({get[a,b]:0})esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0082.failure.json000066400000000000000000000001541331122015500255350ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token (" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0082.js000066400000000000000000000000111331122015500235420ustar00rootroot00000000000000({(a):0})esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0083.failure.json000066400000000000000000000001541331122015500255360ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Unexpected token {" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0083.js000066400000000000000000000000141331122015500235460ustar00rootroot00000000000000({get{a}:0})esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0084.failure.json000066400000000000000000000001611331122015500255350ustar00rootroot00000000000000{ "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0084.js000066400000000000000000000000061331122015500235500ustar00rootroot00000000000000({get esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0085.failure.json000066400000000000000000000001551331122015500255410ustar00rootroot00000000000000{ "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Unexpected token =>" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0085.js000066400000000000000000000000131331122015500235470ustar00rootroot00000000000000((a)) => 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0086.failure.json000066400000000000000000000001561331122015500255430ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Unexpected token =>" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0086.js000066400000000000000000000000161331122015500235530ustar00rootroot00000000000000(a, (b)) => 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0087.failure.json000066400000000000000000000002311331122015500255360ustar00rootroot00000000000000{ "index": 15, "lineNumber": 1, "column": 16, "message": "Error: Line 1: Assignment to eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0087.js000066400000000000000000000000371331122015500235570ustar00rootroot00000000000000"use strict"; (eval = 10) => 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0088.failure.json000066400000000000000000000002321331122015500255400ustar00rootroot00000000000000{ "index": 24, "lineNumber": 1, "column": 25, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0088.js000066400000000000000000000000301331122015500235510ustar00rootroot00000000000000"use strict"; eval => 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0089.failure.json000066400000000000000000000002321331122015500255410ustar00rootroot00000000000000{ "index": 29, "lineNumber": 1, "column": 30, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0089.js000066400000000000000000000000351331122015500235570ustar00rootroot00000000000000"use strict"; arguments => 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0090.failure.json000066400000000000000000000002321331122015500255310ustar00rootroot00000000000000{ "index": 29, "lineNumber": 1, "column": 30, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0090.js000066400000000000000000000000351331122015500235470ustar00rootroot00000000000000"use strict"; (eval, a) => 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0091.failure.json000066400000000000000000000002321331122015500255320ustar00rootroot00000000000000{ "index": 34, "lineNumber": 1, "column": 35, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0091.js000066400000000000000000000000421331122015500235460ustar00rootroot00000000000000"use strict"; (arguments, a) => 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0092.failure.json000066400000000000000000000002251331122015500255350ustar00rootroot00000000000000{ "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0092.js000066400000000000000000000000141331122015500235460ustar00rootroot00000000000000(a, a) => 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0093.failure.json000066400000000000000000000002271331122015500255400ustar00rootroot00000000000000{ "index": 20, "lineNumber": 1, "column": 21, "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0093.js000066400000000000000000000000321331122015500235470ustar00rootroot00000000000000"use strict"; (a, a) => 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0094.failure.json000066400000000000000000000002121331122015500255330ustar00rootroot00000000000000{ "index": 21, "lineNumber": 1, "column": 22, "message": "Error: Line 1: Octal literals are not allowed in strict mode." }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0094.js000066400000000000000000000000271331122015500235540ustar00rootroot00000000000000"use strict"; (a) => 00esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0095.failure.json000066400000000000000000000001551331122015500255420ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token <=" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0095.js000066400000000000000000000000101331122015500235450ustar00rootroot00000000000000() <= 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0096.failure.json000066400000000000000000000001541331122015500255420ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ?" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0096.js000066400000000000000000000000071331122015500235540ustar00rootroot00000000000000() ? 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0097.failure.json000066400000000000000000000001541331122015500255430ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token +" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0097.js000066400000000000000000000000071331122015500235550ustar00rootroot00000000000000() + 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0098.failure.json000066400000000000000000000001551331122015500255450ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Unexpected token =>" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0098.js000066400000000000000000000000121331122015500235520ustar00rootroot00000000000000(10) => 00esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0099.failure.json000066400000000000000000000001561331122015500255470ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Unexpected token =>" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0099.js000066400000000000000000000000161331122015500235570ustar00rootroot00000000000000(10, 20) => 00esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0100.failure.json000066400000000000000000000002321331122015500255210ustar00rootroot00000000000000{ "index": 26, "lineNumber": 1, "column": 27, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0100.js000066400000000000000000000000321331122015500235340ustar00rootroot00000000000000"use strict"; (eval) => 42esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0101.failure.json000066400000000000000000000002321331122015500255220ustar00rootroot00000000000000{ "index": 30, "lineNumber": 1, "column": 31, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0101.js000066400000000000000000000000361331122015500235410ustar00rootroot00000000000000(eval) => { "use strict"; 42 }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0102.failure.json000066400000000000000000000001541331122015500255260ustar00rootroot00000000000000{ "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Unexpected token /" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0102.js000066400000000000000000000000121331122015500235340ustar00rootroot00000000000000p = { q/ }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0103.failure.json000066400000000000000000000001551331122015500255300ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Unexpected token /" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0103.js000066400000000000000000000000141331122015500235370ustar00rootroot00000000000000p = { "q"/ }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0104.failure.json000066400000000000000000000001571331122015500255330ustar00rootroot00000000000000{ "index": 11, "lineNumber": 1, "column": 12, "message": "Error: Line 1: Unexpected token if" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0104.js000066400000000000000000000000221331122015500235370ustar00rootroot00000000000000function t(if) { }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0105.failure.json000066400000000000000000000001611331122015500255270ustar00rootroot00000000000000{ "index": 11, "lineNumber": 1, "column": 12, "message": "Error: Line 1: Unexpected token true" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0105.js000066400000000000000000000000241331122015500235420ustar00rootroot00000000000000function t(true) { }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0106.failure.json000066400000000000000000000001621331122015500255310ustar00rootroot00000000000000{ "index": 11, "lineNumber": 1, "column": 12, "message": "Error: Line 1: Unexpected token false" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0106.js000066400000000000000000000000251331122015500235440ustar00rootroot00000000000000function t(false) { }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0107.failure.json000066400000000000000000000001611331122015500255310ustar00rootroot00000000000000{ "index": 11, "lineNumber": 1, "column": 12, "message": "Error: Line 1: Unexpected token null" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0107.js000066400000000000000000000000241331122015500235440ustar00rootroot00000000000000function t(null) { }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0108.failure.json000066400000000000000000000001601331122015500255310ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Unexpected token null" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0108.js000066400000000000000000000000231331122015500235440ustar00rootroot00000000000000function null() { }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0109.failure.json000066400000000000000000000001601331122015500255320ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Unexpected token true" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0109.js000066400000000000000000000000231331122015500235450ustar00rootroot00000000000000function true() { }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0110.failure.json000066400000000000000000000001611331122015500255230ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Unexpected token false" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0110.js000066400000000000000000000000241331122015500235360ustar00rootroot00000000000000function false() { }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0111.failure.json000066400000000000000000000001561331122015500255300ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Unexpected token if" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0111.js000066400000000000000000000000211331122015500235340ustar00rootroot00000000000000function if() { }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0112.failure.json000066400000000000000000000001571331122015500255320ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected identifier" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0112.js000066400000000000000000000000041331122015500235360ustar00rootroot00000000000000a b;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0113.failure.json000066400000000000000000000001541331122015500255300ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ." }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0113.js000066400000000000000000000000051331122015500235400ustar00rootroot00000000000000if.a;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0114.failure.json000066400000000000000000000001551331122015500255320ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token if" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0114.js000066400000000000000000000000051331122015500235410ustar00rootroot00000000000000a if;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0115.failure.json000066400000000000000000000001621331122015500255310ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected reserved word" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0115.js000066400000000000000000000000071331122015500235440ustar00rootroot00000000000000a enum;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0116.failure.json000066400000000000000000000001611331122015500255310ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Illegal break statement" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0116.js000066400000000000000000000000061331122015500235440ustar00rootroot00000000000000break esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0117.failure.json000066400000000000000000000001531331122015500255330ustar00rootroot00000000000000{ "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Unexpected number" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0117.js000066400000000000000000000000101331122015500235400ustar00rootroot00000000000000break 1;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0118.failure.json000066400000000000000000000001641331122015500255360ustar00rootroot00000000000000{ "index": 8, "lineNumber": 1, "column": 9, "message": "Error: Line 1: Illegal continue statement" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0118.js000066400000000000000000000000111331122015500235420ustar00rootroot00000000000000continue esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0119.failure.json000066400000000000000000000001541331122015500255360ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Unexpected number" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0119.js000066400000000000000000000000131331122015500235450ustar00rootroot00000000000000continue 2;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0120.failure.json000066400000000000000000000001611331122015500255240ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0120.js000066400000000000000000000000051331122015500235360ustar00rootroot00000000000000throwesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0121.failure.json000066400000000000000000000001541331122015500255270ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Unexpected token ;" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0121.js000066400000000000000000000000061331122015500235400ustar00rootroot00000000000000throw;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0122.failure.json000066400000000000000000000001651331122015500255320ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Illegal newline after throw" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0122.js000066400000000000000000000000061331122015500235410ustar00rootroot00000000000000throw esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0123.failure.json000066400000000000000000000001571331122015500255340ustar00rootroot00000000000000{ "index": 15, "lineNumber": 1, "column": 16, "message": "Error: Line 1: Unexpected token in" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0123.js000066400000000000000000000000261331122015500235440ustar00rootroot00000000000000for (var i, i2 in {});esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0124.failure.json000066400000000000000000000001561331122015500255340ustar00rootroot00000000000000{ "index": 14, "lineNumber": 1, "column": 15, "message": "Error: Line 1: Unexpected token )" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0124.js000066400000000000000000000000201331122015500235370ustar00rootroot00000000000000for ((i in {}));esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0125.failure.json000066400000000000000000000001741331122015500255350ustar00rootroot00000000000000{ "index": 10, "lineNumber": 1, "column": 11, "message": "Error: Line 1: Invalid left-hand side in for-in" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0125.js000066400000000000000000000000221331122015500235420ustar00rootroot00000000000000for (i + 1 in {});esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0126.failure.json000066400000000000000000000001721331122015500255340ustar00rootroot00000000000000{ "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Invalid left-hand side in for-in" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0126.js000066400000000000000000000000171331122015500235470ustar00rootroot00000000000000for (+i in {});esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0127.failure.json000066400000000000000000000001621331122015500255340ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0127.js000066400000000000000000000000111331122015500235420ustar00rootroot00000000000000if(false)esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0128.failure.json000066400000000000000000000001631331122015500255360ustar00rootroot00000000000000{ "index": 24, "lineNumber": 1, "column": 25, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0128.js000066400000000000000000000000301331122015500235440ustar00rootroot00000000000000if(false) doThis(); elseesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0129.failure.json000066400000000000000000000001611331122015500255350ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0129.js000066400000000000000000000000021331122015500235440ustar00rootroot00000000000000doesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0130.failure.json000066400000000000000000000001631331122015500255270ustar00rootroot00000000000000{ "index": 12, "lineNumber": 1, "column": 13, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0130.js000066400000000000000000000000141331122015500235370ustar00rootroot00000000000000while(false)esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0131.failure.json000066400000000000000000000001611331122015500255260ustar00rootroot00000000000000{ "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0131.js000066400000000000000000000000071331122015500235420ustar00rootroot00000000000000for(;;)esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0132.failure.json000066400000000000000000000001611331122015500255270ustar00rootroot00000000000000{ "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0132.js000066400000000000000000000000071331122015500235430ustar00rootroot00000000000000with(x)esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0133.failure.json000066400000000000000000000001741331122015500255340ustar00rootroot00000000000000{ "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Missing catch or finally after try" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0133.js000066400000000000000000000000071331122015500235440ustar00rootroot00000000000000try { }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0134.failure.json000066400000000000000000000001551331122015500255340ustar00rootroot00000000000000{ "index": 14, "lineNumber": 1, "column": 15, "message": "Error: Line 1: Unexpected number" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0134.js000066400000000000000000000000251331122015500235450ustar00rootroot00000000000000try {} catch (42) {} esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0135.failure.json000066400000000000000000000001561331122015500255360ustar00rootroot00000000000000{ "index": 20, "lineNumber": 1, "column": 21, "message": "Error: Line 1: Unexpected token (" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0135.js000066400000000000000000000000331331122015500235450ustar00rootroot00000000000000try {} catch (answer()) {} esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0136.failure.json000066400000000000000000000001561331122015500255370ustar00rootroot00000000000000{ "index": 14, "lineNumber": 1, "column": 15, "message": "Error: Line 1: Unexpected token -" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0136.js000066400000000000000000000000251331122015500235470ustar00rootroot00000000000000try {} catch (-x) {} esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0137.failure.json000066400000000000000000000001621331122015500255350ustar00rootroot00000000000000{ "index": 0, "lineNumber": 1, "column": 1, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0137.source.js000066400000000000000000000000331331122015500250460ustar00rootroot00000000000000var source = '\u203F = 10';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0138.failure.json000066400000000000000000000002441331122015500255370ustar00rootroot00000000000000{"index":15,"lineNumber":1,"column":16,"message":"Error: Line 1: Missing initializer in const declaration","description":"Missing initializer in const declaration"}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0138.js000066400000000000000000000000201331122015500235440ustar00rootroot00000000000000const x = 12, y;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0139.failure.json000066400000000000000000000002421331122015500255360ustar00rootroot00000000000000{"index":7,"lineNumber":1,"column":8,"message":"Error: Line 1: Missing initializer in const declaration","description":"Missing initializer in const declaration"}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0139.js000066400000000000000000000000201331122015500235450ustar00rootroot00000000000000const x, y = 12;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0140.failure.json000066400000000000000000000002421331122015500255260ustar00rootroot00000000000000{"index":7,"lineNumber":1,"column":8,"message":"Error: Line 1: Missing initializer in const declaration","description":"Missing initializer in const declaration"}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0140.js000066400000000000000000000000101331122015500235340ustar00rootroot00000000000000const x;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0141.failure.json000066400000000000000000000001761331122015500255350ustar00rootroot00000000000000{"index":13,"lineNumber":1,"column":14,"message":"Error: Line 1: Unexpected identifier","description":"Unexpected identifier"}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0141.js000066400000000000000000000000231331122015500235410ustar00rootroot00000000000000if(true) let a = 1;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0142.failure.json000066400000000000000000000001611331122015500255300ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Unexpected token const" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0142.js000066400000000000000000000000251331122015500235440ustar00rootroot00000000000000if(true) const a = 1;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0143.failure.json000066400000000000000000000002141331122015500255300ustar00rootroot00000000000000{ "index": 30, "lineNumber": 1, "column": 31, "message": "Error: Line 1: More than one default clause in switch statement" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0143.js000066400000000000000000000000401331122015500235420ustar00rootroot00000000000000switch (c) { default: default: }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0144.failure.json000066400000000000000000000001531331122015500255330ustar00rootroot00000000000000{ "index": 8, "lineNumber": 1, "column": 9, "message": "Error: Line 1: Unexpected string" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0144.js000066400000000000000000000000131331122015500235430ustar00rootroot00000000000000new X()."s"esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0145.failure.json000066400000000000000000000001621331122015500255340ustar00rootroot00000000000000{ "index": 2, "lineNumber": 1, "column": 3, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0145.js000066400000000000000000000000021331122015500235420ustar00rootroot00000000000000/*esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0146.failure.json000066400000000000000000000001621331122015500255350ustar00rootroot00000000000000{ "index": 5, "lineNumber": 4, "column": 1, "message": "Error: Line 4: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0146.js000066400000000000000000000000051331122015500235460ustar00rootroot00000000000000/* esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0147.failure.json000066400000000000000000000001621331122015500255360ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0147.js000066400000000000000000000000031331122015500235450ustar00rootroot00000000000000/**esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0148.failure.json000066400000000000000000000001621331122015500255370ustar00rootroot00000000000000{ "index": 5, "lineNumber": 3, "column": 2, "message": "Error: Line 3: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0148.js000066400000000000000000000000051331122015500235500ustar00rootroot00000000000000/* *esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0149.failure.json000066400000000000000000000001621331122015500255400ustar00rootroot00000000000000{ "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0149.js000066400000000000000000000000071331122015500235530ustar00rootroot00000000000000/*helloesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0150.failure.json000066400000000000000000000001641331122015500255320ustar00rootroot00000000000000{ "index": 10, "lineNumber": 1, "column": 11, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0150.js000066400000000000000000000000121331122015500235370ustar00rootroot00000000000000/*hello *esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0151.failure.json000066400000000000000000000001541331122015500255320ustar00rootroot00000000000000{ "index": 1, "lineNumber": 2, "column": 1, "message": "Error: Line 2: Unexpected token ]" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0151.js000066400000000000000000000000021331122015500235370ustar00rootroot00000000000000 ]esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0152.failure.json000066400000000000000000000001541331122015500255330ustar00rootroot00000000000000{ "index": 1, "lineNumber": 2, "column": 1, "message": "Error: Line 2: Unexpected token ]" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0152.js000066400000000000000000000000021331122015500235400ustar00rootroot00000000000000 ]esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0153.failure.json000066400000000000000000000001541331122015500255340ustar00rootroot00000000000000{ "index": 2, "lineNumber": 2, "column": 1, "message": "Error: Line 2: Unexpected token ]" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0153.js000066400000000000000000000000031331122015500235420ustar00rootroot00000000000000 ]esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0154.failure.json000066400000000000000000000001541331122015500255350ustar00rootroot00000000000000{ "index": 2, "lineNumber": 3, "column": 1, "message": "Error: Line 3: Unexpected token ]" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0154.js000066400000000000000000000000031331122015500235430ustar00rootroot00000000000000 ]esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0155.failure.json000066400000000000000000000001541331122015500255360ustar00rootroot00000000000000{ "index": 4, "lineNumber": 2, "column": 1, "message": "Error: Line 2: Unexpected token ]" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0155.js000066400000000000000000000000051331122015500235460ustar00rootroot00000000000000// ]esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0156.failure.json000066400000000000000000000001541331122015500255370ustar00rootroot00000000000000{ "index": 4, "lineNumber": 3, "column": 1, "message": "Error: Line 3: Unexpected token ]" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0156.js000066400000000000000000000000051331122015500235470ustar00rootroot00000000000000// ]esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0157.failure.json000066400000000000000000000001771331122015500255450ustar00rootroot00000000000000{ "index": 4, "lineNumber": 1, "column": 5, "message": "Error: Line 1: Invalid regular expression: missing /" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0157.js000066400000000000000000000000051331122015500235500ustar00rootroot00000000000000/a\ /esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0158.failure.json000066400000000000000000000001541331122015500255410ustar00rootroot00000000000000{ "index": 5, "lineNumber": 3, "column": 1, "message": "Error: Line 3: Unexpected token ]" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0158.js000066400000000000000000000000061331122015500235520ustar00rootroot00000000000000// ]esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0159.failure.json000066400000000000000000000001541331122015500255420ustar00rootroot00000000000000{ "index": 6, "lineNumber": 2, "column": 3, "message": "Error: Line 2: Unexpected token ]" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0159.js000066400000000000000000000000071331122015500235540ustar00rootroot00000000000000/* */]esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0160.failure.json000066400000000000000000000001541331122015500255320ustar00rootroot00000000000000{ "index": 6, "lineNumber": 3, "column": 3, "message": "Error: Line 3: Unexpected token ]" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0160.js000066400000000000000000000000071331122015500235440ustar00rootroot00000000000000/* */]esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0161.failure.json000066400000000000000000000001541331122015500255330ustar00rootroot00000000000000{ "index": 7, "lineNumber": 3, "column": 3, "message": "Error: Line 3: Unexpected token ]" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0161.js000066400000000000000000000000101331122015500235370ustar00rootroot00000000000000/* */]esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0162.failure.json000066400000000000000000000001621331122015500255330ustar00rootroot00000000000000{ "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0162.js000066400000000000000000000000021331122015500235410ustar00rootroot00000000000000\\esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0163.failure.json000066400000000000000000000001621331122015500255340ustar00rootroot00000000000000{ "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0163.source.js000066400000000000000000000000271331122015500250500ustar00rootroot00000000000000var source = '\\u005c';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0164.failure.json000066400000000000000000000001621331122015500255350ustar00rootroot00000000000000{ "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0164.js000066400000000000000000000000021331122015500235430ustar00rootroot00000000000000\xesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0165.failure.json000066400000000000000000000001621331122015500255360ustar00rootroot00000000000000{ "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0165.source.js000066400000000000000000000000271331122015500250520ustar00rootroot00000000000000var source = '\\u0000';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0166.failure.json000066400000000000000000000001621331122015500255370ustar00rootroot00000000000000{ "index": 0, "lineNumber": 1, "column": 1, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0166.source.js000066400000000000000000000000331331122015500250500ustar00rootroot00000000000000var source = '\u200C = []';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0167.failure.json000066400000000000000000000001621331122015500255400ustar00rootroot00000000000000{ "index": 0, "lineNumber": 1, "column": 1, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0167.source.js000066400000000000000000000000331331122015500250510ustar00rootroot00000000000000var source = '\u200D = []';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0168.failure.json000066400000000000000000000001631331122015500255420ustar00rootroot00000000000000{ "index": 0, "lineNumber": 1, "column": 1, "message": "Error: Line 1: Unexpected token ILLEGAL" } esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0168.js000066400000000000000000000000021331122015500235470ustar00rootroot00000000000000"\esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0169.failure.json000066400000000000000000000001621331122015500255420ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0169.source.js000066400000000000000000000000241331122015500250530ustar00rootroot00000000000000var source = '"\\u';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0170.failure.json000066400000000000000000000001561331122015500255350ustar00rootroot00000000000000{ "index": 14, "lineNumber": 1, "column": 15, "message": "Error: Line 1: Unexpected token )" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0170.js000066400000000000000000000000221331122015500235420ustar00rootroot00000000000000try { } catch() {}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0171.failure.json000066400000000000000000000001621331122015500255330ustar00rootroot00000000000000{ "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Illegal return statement" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0171.js000066400000000000000000000000061331122015500235450ustar00rootroot00000000000000returnesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0172.failure.json000066400000000000000000000001611331122015500255330ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Illegal break statement" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0172.js000066400000000000000000000000051331122015500235450ustar00rootroot00000000000000breakesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0173.failure.json000066400000000000000000000001641331122015500255370ustar00rootroot00000000000000{ "index": 8, "lineNumber": 1, "column": 9, "message": "Error: Line 1: Illegal continue statement" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0173.js000066400000000000000000000000101331122015500235420ustar00rootroot00000000000000continueesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0174.failure.json000066400000000000000000000001661331122015500255420ustar00rootroot00000000000000{ "index": 31, "lineNumber": 1, "column": 32, "message": "Error: Line 1: Illegal continue statement" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0174.js000066400000000000000000000000411331122015500235470ustar00rootroot00000000000000switch (x) { default: continue; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0175.failure.json000066400000000000000000000001551331122015500255410ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Unexpected token *" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0175.js000066400000000000000000000000121331122015500235460ustar00rootroot00000000000000do { x } *esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0176.failure.json000066400000000000000000000001571331122015500255440ustar00rootroot00000000000000{ "index": 22, "lineNumber": 1, "column": 23, "message": "Error: Line 1: Undefined label 'x'" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0176.js000066400000000000000000000000311331122015500235500ustar00rootroot00000000000000while (true) { break x; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0177.failure.json000066400000000000000000000001571331122015500255450ustar00rootroot00000000000000{ "index": 25, "lineNumber": 1, "column": 26, "message": "Error: Line 1: Undefined label 'x'" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0177.js000066400000000000000000000000341331122015500235540ustar00rootroot00000000000000while (true) { continue x; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0178.failure.json000066400000000000000000000001571331122015500255460ustar00rootroot00000000000000{ "index": 40, "lineNumber": 1, "column": 41, "message": "Error: Line 1: Undefined label 'x'" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0178.js000066400000000000000000000000571331122015500235620ustar00rootroot00000000000000x: while (true) { (function () { break x; }); }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0179.failure.json000066400000000000000000000001571331122015500255470ustar00rootroot00000000000000{ "index": 43, "lineNumber": 1, "column": 44, "message": "Error: Line 1: Undefined label 'x'" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0179.js000066400000000000000000000000621331122015500235570ustar00rootroot00000000000000x: while (true) { (function () { continue x; }); }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0180.failure.json000066400000000000000000000001631331122015500255340ustar00rootroot00000000000000{ "index": 39, "lineNumber": 1, "column": 40, "message": "Error: Line 1: Illegal break statement" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0180.js000066400000000000000000000000551331122015500235510ustar00rootroot00000000000000x: while (true) { (function () { break; }); }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0181.failure.json000066400000000000000000000001661331122015500255400ustar00rootroot00000000000000{ "index": 42, "lineNumber": 1, "column": 43, "message": "Error: Line 1: Illegal continue statement" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0181.js000066400000000000000000000000601331122015500235460ustar00rootroot00000000000000x: while (true) { (function () { continue; }); }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0182.failure.json000066400000000000000000000001771331122015500255430ustar00rootroot00000000000000{ "index": 20, "lineNumber": 1, "column": 21, "message": "Error: Line 1: Label 'x' has already been declared" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0182.js000066400000000000000000000000471331122015500235540ustar00rootroot00000000000000x: while (true) { x: while (true) { } }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0183.failure.json000066400000000000000000000002171331122015500255370ustar00rootroot00000000000000{ "index": 37, "lineNumber": 1, "column": 38, "message": "Error: Line 1: Delete of an unqualified identifier in strict mode." }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0183.js000066400000000000000000000000531331122015500235520ustar00rootroot00000000000000(function () { 'use strict'; delete i; }())esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0184.failure.json000066400000000000000000000002151331122015500255360ustar00rootroot00000000000000{ "index": 28, "lineNumber": 1, "column": 29, "message": "Error: Line 1: Strict mode code may not include a with statement" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0184.js000066400000000000000000000000531331122015500235530ustar00rootroot00000000000000(function () { 'use strict'; with (i); }())esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0185.failure.json000066400000000000000000000002251331122015500255400ustar00rootroot00000000000000{ "index": 40, "lineNumber": 1, "column": 41, "message": "Error: Line 1: Variable name may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0185.js000066400000000000000000000000601331122015500235520ustar00rootroot00000000000000function hello() {'use strict'; var eval = 10; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0186.failure.json000066400000000000000000000002251331122015500255410ustar00rootroot00000000000000{ "index": 45, "lineNumber": 1, "column": 46, "message": "Error: Line 1: Variable name may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0186.js000066400000000000000000000000651331122015500235600ustar00rootroot00000000000000function hello() {'use strict'; var arguments = 10; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0187.failure.json000066400000000000000000000002261331122015500255430ustar00rootroot00000000000000{ "index": 51, "lineNumber": 1, "column": 52, "message": "Error: Line 1: Catch variable may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0187.js000066400000000000000000000000721331122015500235570ustar00rootroot00000000000000function hello() {'use strict'; try { } catch (eval) { } }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0188.failure.json000066400000000000000000000002261331122015500255440ustar00rootroot00000000000000{ "index": 56, "lineNumber": 1, "column": 57, "message": "Error: Line 1: Catch variable may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0188.js000066400000000000000000000000771331122015500235650ustar00rootroot00000000000000function hello() {'use strict'; try { } catch (arguments) { } }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0189.failure.json000066400000000000000000000002311331122015500255410ustar00rootroot00000000000000{ "index": 32, "lineNumber": 1, "column": 33, "message": "Error: Line 1: Assignment to eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0189.js000066400000000000000000000000541331122015500235610ustar00rootroot00000000000000function hello() {'use strict'; eval = 10; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0190.failure.json000066400000000000000000000002311331122015500255310ustar00rootroot00000000000000{ "index": 32, "lineNumber": 1, "column": 33, "message": "Error: Line 1: Assignment to eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0190.js000066400000000000000000000000611331122015500235470ustar00rootroot00000000000000function hello() {'use strict'; arguments = 10; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0191.failure.json000066400000000000000000000002541331122015500255370ustar00rootroot00000000000000{ "index": 38, "lineNumber": 1, "column": 39, "message": "Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0191.js000066400000000000000000000000511331122015500235470ustar00rootroot00000000000000function hello() {'use strict'; ++eval; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0192.failure.json000066400000000000000000000002541331122015500255400ustar00rootroot00000000000000{ "index": 38, "lineNumber": 1, "column": 39, "message": "Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0192.js000066400000000000000000000000511331122015500235500ustar00rootroot00000000000000function hello() {'use strict'; --eval; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0193.failure.json000066400000000000000000000002541331122015500255410ustar00rootroot00000000000000{ "index": 43, "lineNumber": 1, "column": 44, "message": "Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0193.js000066400000000000000000000000561331122015500235560ustar00rootroot00000000000000function hello() {'use strict'; ++arguments; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0194.failure.json000066400000000000000000000002541331122015500255420ustar00rootroot00000000000000{ "index": 43, "lineNumber": 1, "column": 44, "message": "Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0194.js000066400000000000000000000000561331122015500235570ustar00rootroot00000000000000function hello() {'use strict'; --arguments; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0195.failure.json000066400000000000000000000002551331122015500255440ustar00rootroot00000000000000{ "index": 36, "lineNumber": 1, "column": 37, "message": "Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0195.js000066400000000000000000000000511331122015500235530ustar00rootroot00000000000000function hello() {'use strict'; eval++; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0196.failure.json000066400000000000000000000002551331122015500255450ustar00rootroot00000000000000{ "index": 36, "lineNumber": 1, "column": 37, "message": "Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0196.js000066400000000000000000000000511331122015500235540ustar00rootroot00000000000000function hello() {'use strict'; eval--; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0197.failure.json000066400000000000000000000002551331122015500255460ustar00rootroot00000000000000{ "index": 41, "lineNumber": 1, "column": 42, "message": "Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0197.js000066400000000000000000000000561331122015500235620ustar00rootroot00000000000000function hello() {'use strict'; arguments++; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0198.failure.json000066400000000000000000000002551331122015500255470ustar00rootroot00000000000000{ "index": 41, "lineNumber": 1, "column": 42, "message": "Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0198.js000066400000000000000000000000561331122015500235630ustar00rootroot00000000000000function hello() {'use strict'; arguments--; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0199.failure.json000066400000000000000000000002251331122015500255450ustar00rootroot00000000000000{ "index": 41, "lineNumber": 1, "column": 42, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0199.js000066400000000000000000000000651331122015500235640ustar00rootroot00000000000000function hello() {'use strict'; function eval() { } }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0200.failure.json000066400000000000000000000002251331122015500255240ustar00rootroot00000000000000{ "index": 41, "lineNumber": 1, "column": 42, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0200.js000066400000000000000000000000721331122015500235410ustar00rootroot00000000000000function hello() {'use strict'; function arguments() { } }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0201.failure.json000066400000000000000000000002241331122015500255240ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0201.js000066400000000000000000000000401331122015500235350ustar00rootroot00000000000000function eval() {'use strict'; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0202.failure.json000066400000000000000000000002241331122015500255250ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0202.js000066400000000000000000000000451331122015500235430ustar00rootroot00000000000000function arguments() {'use strict'; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0203.failure.json000066400000000000000000000002251331122015500255270ustar00rootroot00000000000000{ "index": 42, "lineNumber": 1, "column": 43, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0203.js000066400000000000000000000000711331122015500235430ustar00rootroot00000000000000function hello() {'use strict'; (function eval() { }()) }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0204.failure.json000066400000000000000000000002251331122015500255300ustar00rootroot00000000000000{ "index": 42, "lineNumber": 1, "column": 43, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0204.js000066400000000000000000000000761331122015500235510ustar00rootroot00000000000000function hello() {'use strict'; (function arguments() { }()) }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0205.failure.json000066400000000000000000000002251331122015500255310ustar00rootroot00000000000000{ "index": 10, "lineNumber": 1, "column": 11, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0205.js000066400000000000000000000000441331122015500235450ustar00rootroot00000000000000(function eval() {'use strict'; })()esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0206.failure.json000066400000000000000000000002251331122015500255320ustar00rootroot00000000000000{ "index": 10, "lineNumber": 1, "column": 11, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0206.js000066400000000000000000000000511331122015500235440ustar00rootroot00000000000000(function arguments() {'use strict'; })()esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0207.failure.json000066400000000000000000000002251331122015500255330ustar00rootroot00000000000000{ "index": 47, "lineNumber": 1, "column": 48, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0207.js000066400000000000000000000000771331122015500235550ustar00rootroot00000000000000function hello() {'use strict'; ({ s: function eval() { } }); }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0208.failure.json000066400000000000000000000002061331122015500255330ustar00rootroot00000000000000{ "index": 10, "lineNumber": 1, "column": 11, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0208.js000066400000000000000000000000471331122015500235530ustar00rootroot00000000000000(function package() {'use strict'; })()esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0209.failure.json000066400000000000000000000002321331122015500255330ustar00rootroot00000000000000{ "index": 48, "lineNumber": 1, "column": 49, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0209.js000066400000000000000000000000771331122015500235570ustar00rootroot00000000000000function hello() {'use strict'; ({ i: 10, set s(eval) { } }); }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0210.failure.json000066400000000000000000000002321331122015500255230ustar00rootroot00000000000000{ "index": 41, "lineNumber": 1, "column": 42, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0210.js000066400000000000000000000000701331122015500235400ustar00rootroot00000000000000function hello() {'use strict'; ({ set s(eval) { } }); }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0211.failure.json000066400000000000000000000002321331122015500255240ustar00rootroot00000000000000{ "index": 49, "lineNumber": 1, "column": 50, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0211.js000066400000000000000000000001001331122015500235330ustar00rootroot00000000000000function hello() {'use strict'; ({ s: function s(eval) { } }); }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0212.failure.json000066400000000000000000000002321331122015500255250ustar00rootroot00000000000000{ "index": 15, "lineNumber": 1, "column": 16, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0212.js000066400000000000000000000000441331122015500235430ustar00rootroot00000000000000function hello(eval) {'use strict';}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0213.failure.json000066400000000000000000000002321331122015500255260ustar00rootroot00000000000000{ "index": 15, "lineNumber": 1, "column": 16, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0213.js000066400000000000000000000000511331122015500235420ustar00rootroot00000000000000function hello(arguments) {'use strict';}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0214.failure.json000066400000000000000000000002321331122015500255270ustar00rootroot00000000000000{ "index": 48, "lineNumber": 1, "column": 49, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0214.js000066400000000000000000000000721331122015500235460ustar00rootroot00000000000000function hello() { 'use strict'; function inner(eval) {} }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0215.failure.json000066400000000000000000000002321331122015500255300ustar00rootroot00000000000000{ "index": 48, "lineNumber": 1, "column": 49, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0215.js000066400000000000000000000000771331122015500235540ustar00rootroot00000000000000function hello() { 'use strict'; function inner(arguments) {} }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0216.failure.json000066400000000000000000000002101331122015500255250ustar00rootroot00000000000000{ "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Octal literals are not allowed in strict mode." }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0216.js000066400000000000000000000000241331122015500235450ustar00rootroot00000000000000 "\1"; 'use strict';esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0217.failure.json000066400000000000000000000002121331122015500255300ustar00rootroot00000000000000{ "index": 33, "lineNumber": 1, "column": 34, "message": "Error: Line 1: Octal literals are not allowed in strict mode." }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0217.js000066400000000000000000000000501331122015500235450ustar00rootroot00000000000000function hello() { 'use strict'; "\1"; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0218.failure.json000066400000000000000000000002121331122015500255310ustar00rootroot00000000000000{ "index": 33, "lineNumber": 1, "column": 34, "message": "Error: Line 1: Octal literals are not allowed in strict mode." }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0218.js000066400000000000000000000000471331122015500235540ustar00rootroot00000000000000function hello() { 'use strict'; 021; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0219.failure.json000066400000000000000000000002121331122015500255320ustar00rootroot00000000000000{ "index": 36, "lineNumber": 1, "column": 37, "message": "Error: Line 1: Octal literals are not allowed in strict mode." }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0219.js000066400000000000000000000000621331122015500235520ustar00rootroot00000000000000function hello() { 'use strict'; ({ "\1": 42 }); }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0220.failure.json000066400000000000000000000002121331122015500255220ustar00rootroot00000000000000{ "index": 36, "lineNumber": 1, "column": 37, "message": "Error: Line 1: Octal literals are not allowed in strict mode." }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0220.js000066400000000000000000000000611331122015500235410ustar00rootroot00000000000000function hello() { 'use strict'; ({ 021: 42 }); }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0221.failure.json000066400000000000000000000002121331122015500255230ustar00rootroot00000000000000{ "index": 19, "lineNumber": 1, "column": 20, "message": "Error: Line 1: Octal literals are not allowed in strict mode." }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0221.js000066400000000000000000000000671331122015500235500ustar00rootroot00000000000000function hello() { "octal directive\1"; "use strict"; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0222.failure.json000066400000000000000000000002121331122015500255240ustar00rootroot00000000000000{ "index": 19, "lineNumber": 1, "column": 20, "message": "Error: Line 1: Octal literals are not allowed in strict mode." }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0222.js000066400000000000000000000001141331122015500235420ustar00rootroot00000000000000function hello() { "octal directive\1"; "octal directive\2"; "use strict"; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0223.failure.json000066400000000000000000000002121331122015500255250ustar00rootroot00000000000000{ "index": 52, "lineNumber": 1, "column": 53, "message": "Error: Line 1: Octal literals are not allowed in strict mode." }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0223.js000066400000000000000000000001141331122015500235430ustar00rootroot00000000000000function hello() { "use strict"; function inner() { "octal directive\1"; } }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0224.failure.json000066400000000000000000000002061331122015500255310ustar00rootroot00000000000000{ "index": 37, "lineNumber": 1, "column": 38, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0224.js000066400000000000000000000000621331122015500235460ustar00rootroot00000000000000function hello() { "use strict"; var implements; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0225.failure.json000066400000000000000000000002061331122015500255320ustar00rootroot00000000000000{ "index": 37, "lineNumber": 1, "column": 38, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0225.js000066400000000000000000000000611331122015500235460ustar00rootroot00000000000000function hello() { "use strict"; var interface; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0226.failure.json000066400000000000000000000002061331122015500255330ustar00rootroot00000000000000{ "index": 37, "lineNumber": 1, "column": 38, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0226.js000066400000000000000000000000571331122015500235540ustar00rootroot00000000000000function hello() { "use strict"; var package; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0227.failure.json000066400000000000000000000002061331122015500255340ustar00rootroot00000000000000{ "index": 37, "lineNumber": 1, "column": 38, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0227.js000066400000000000000000000000571331122015500235550ustar00rootroot00000000000000function hello() { "use strict"; var private; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0228.failure.json000066400000000000000000000002061331122015500255350ustar00rootroot00000000000000{ "index": 37, "lineNumber": 1, "column": 38, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0228.js000066400000000000000000000000611331122015500235510ustar00rootroot00000000000000function hello() { "use strict"; var protected; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0229.failure.json000066400000000000000000000002061331122015500255360ustar00rootroot00000000000000{ "index": 37, "lineNumber": 1, "column": 38, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0229.js000066400000000000000000000000561331122015500235560ustar00rootroot00000000000000function hello() { "use strict"; var public; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0230.failure.json000066400000000000000000000002061331122015500255260ustar00rootroot00000000000000{ "index": 37, "lineNumber": 1, "column": 38, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0230.js000066400000000000000000000000561331122015500235460ustar00rootroot00000000000000function hello() { "use strict"; var static; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0231.failure.json000066400000000000000000000002061331122015500255270ustar00rootroot00000000000000{ "index": 37, "lineNumber": 1, "column": 38, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0231.js000066400000000000000000000000551331122015500235460ustar00rootroot00000000000000function hello() { "use strict"; var yield; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0232.failure.json000066400000000000000000000002061331122015500255300ustar00rootroot00000000000000{ "index": 37, "lineNumber": 1, "column": 38, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0232.js000066400000000000000000000000531331122015500235450ustar00rootroot00000000000000function hello() { "use strict"; var let; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0233.failure.json000066400000000000000000000002061331122015500255310ustar00rootroot00000000000000{ "index": 15, "lineNumber": 1, "column": 16, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0233.js000066400000000000000000000000501331122015500235430ustar00rootroot00000000000000function hello(static) { "use strict"; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0234.failure.json000066400000000000000000000002051331122015500255310ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0234.js000066400000000000000000000000431331122015500235460ustar00rootroot00000000000000function static() { "use strict"; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0235.failure.json000066400000000000000000000002241331122015500255330ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0235.js000066400000000000000000000000421331122015500235460ustar00rootroot00000000000000function eval(a) { "use strict"; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0236.failure.json000066400000000000000000000002241331122015500255340ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0236.js000066400000000000000000000000471331122015500235540ustar00rootroot00000000000000function arguments(a) { "use strict"; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0239.failure.json000066400000000000000000000002061331122015500255370ustar00rootroot00000000000000{ "index": 23, "lineNumber": 1, "column": 24, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0239.js000066400000000000000000000000431331122015500235530ustar00rootroot00000000000000"use strict"; function static() { }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0240.failure.json000066400000000000000000000002271331122015500255320ustar00rootroot00000000000000{ "index": 14, "lineNumber": 1, "column": 15, "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0240.js000066400000000000000000000000421331122015500235420ustar00rootroot00000000000000function a(t, t) { "use strict"; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0241.failure.json000066400000000000000000000002321331122015500255270ustar00rootroot00000000000000{ "index": 11, "lineNumber": 1, "column": 12, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0241.js000066400000000000000000000000421331122015500235430ustar00rootroot00000000000000function a(eval) { "use strict"; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0242.failure.json000066400000000000000000000002061331122015500255310ustar00rootroot00000000000000{ "index": 11, "lineNumber": 1, "column": 12, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0242.js000066400000000000000000000000451331122015500235470ustar00rootroot00000000000000function a(package) { "use strict"; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0243.failure.json000066400000000000000000000002271331122015500255350ustar00rootroot00000000000000{ "index": 43, "lineNumber": 1, "column": 44, "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0243.js000066400000000000000000000000641331122015500235510ustar00rootroot00000000000000function a() { "use strict"; function b(t, t) { }; }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0244.failure.json000066400000000000000000000002271331122015500255360ustar00rootroot00000000000000{ "index": 15, "lineNumber": 1, "column": 16, "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0244.js000066400000000000000000000000441331122015500235500ustar00rootroot00000000000000(function a(t, t) { "use strict"; })esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0245.failure.json000066400000000000000000000002271331122015500255370ustar00rootroot00000000000000{ "index": 44, "lineNumber": 1, "column": 45, "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0245.js000066400000000000000000000000661331122015500235550ustar00rootroot00000000000000function a() { "use strict"; (function b(t, t) { }); }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0246.failure.json000066400000000000000000000002321331122015500255340ustar00rootroot00000000000000{ "index": 12, "lineNumber": 1, "column": 13, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0246.js000066400000000000000000000000441331122015500235520ustar00rootroot00000000000000(function a(eval) { "use strict"; })esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0247.failure.json000066400000000000000000000002061331122015500255360ustar00rootroot00000000000000{ "index": 12, "lineNumber": 1, "column": 13, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0247.js000066400000000000000000000000471331122015500235560ustar00rootroot00000000000000(function a(package) { "use strict"; })esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0248.failure.json000066400000000000000000000002071331122015500255400ustar00rootroot00000000000000{ "index": 21, "lineNumber": 1, "column": 22, "message": "Error: Line 1: Label '__proto__' has already been declared" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0248.js000066400000000000000000000000311331122015500235500ustar00rootroot00000000000000__proto__: __proto__: 42;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0249.failure.json000066400000000000000000000002271331122015500255430ustar00rootroot00000000000000{ "index": 36, "lineNumber": 1, "column": 37, "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0249.js000066400000000000000000000000621331122015500235550ustar00rootroot00000000000000"use strict"; function t(__proto__, __proto__) { }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0250.failure.json000066400000000000000000000002311331122015500255260ustar00rootroot00000000000000{ "index": 30, "lineNumber": 1, "column": 31, "message": "Error: Line 1: Duplicate __proto__ fields are not allowed in object literals" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0250.js000066400000000000000000000000441331122015500235450ustar00rootroot00000000000000x = { __proto__: 42, __proto__: 43 }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0252.failure.json000066400000000000000000000001611331122015500255320ustar00rootroot00000000000000{ "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0252.js000066400000000000000000000000031331122015500235420ustar00rootroot00000000000000varesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0254.failure.json000066400000000000000000000001611331122015500255340ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0254.js000066400000000000000000000000051331122015500235460ustar00rootroot00000000000000constesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0255.failure.json000066400000000000000000000001611331122015500255350ustar00rootroot00000000000000{ "index": 8, "lineNumber": 1, "column": 9, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0255.js000066400000000000000000000000101331122015500235430ustar00rootroot00000000000000{ ; ; esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0256.failure.json000066400000000000000000000001631331122015500255400ustar00rootroot00000000000000{ "index": 21, "lineNumber": 1, "column": 22, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0256.js000066400000000000000000000000251331122015500235520ustar00rootroot00000000000000function t() { ; ; esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0257.failure.json000066400000000000000000000002061331122015500255370ustar00rootroot00000000000000{ "index": 16, "lineNumber": 1, "column": 17, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0257.js000066400000000000000000000000271331122015500235550ustar00rootroot00000000000000'use strict'; a packageesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0258.failure.json000066400000000000000000000002101331122015500255330ustar00rootroot00000000000000{ "index": 18, "lineNumber": 1, "column": 19, "message": "Error: Line 1: Rest parameter must be last formal parameter" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0258.js000066400000000000000000000000301331122015500235500ustar00rootroot00000000000000function f(a, ...b, c){}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0260.failure.json000066400000000000000000000001561331122015500255350ustar00rootroot00000000000000{ "index": 15, "lineNumber": 1, "column": 16, "message": "Error: Line 1: Unexpected token =" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0260.js000066400000000000000000000000261331122015500235460ustar00rootroot00000000000000function x(...a = 1){}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0261.failure.json000066400000000000000000000001611331122015500255320ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0261.js000066400000000000000000000000051331122015500235440ustar00rootroot00000000000000classesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0262.failure.json000066400000000000000000000001611331122015500255330ustar00rootroot00000000000000{ "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0262.js000066400000000000000000000000061331122015500235460ustar00rootroot00000000000000class esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0263.failure.json000066400000000000000000000001541331122015500255360ustar00rootroot00000000000000{ "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Unexpected token ;" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0263.js000066400000000000000000000000061331122015500235470ustar00rootroot00000000000000class;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0264.failure.json000066400000000000000000000001561331122015500255410ustar00rootroot00000000000000{ "index": 18, "lineNumber": 1, "column": 19, "message": "Error: Line 1: Unexpected token +" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0264.js000066400000000000000000000000301331122015500235450ustar00rootroot00000000000000class A extends a + b {}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0265.failure.json000066400000000000000000000001611331122015500255360ustar00rootroot00000000000000{ "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0265.js000066400000000000000000000000071331122015500235520ustar00rootroot00000000000000class Aesprima-4.0.1/test/fixtures/invalid-syntax/migrated_0266.failure.json000066400000000000000000000001621331122015500255400ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Unexpected end of input" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0266.js000066400000000000000000000000111331122015500235460ustar00rootroot00000000000000class A {esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0267.failure.json000066400000000000000000000001541331122015500255420ustar00rootroot00000000000000{ "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Unexpected token ;" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0267.js000066400000000000000000000000101331122015500235460ustar00rootroot00000000000000class A;esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0268.failure.json000066400000000000000000000001561331122015500255450ustar00rootroot00000000000000{ "index": 10, "lineNumber": 1, "column": 11, "message": "Error: Line 1: Unexpected token :" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0268.js000066400000000000000000000000151331122015500235540ustar00rootroot00000000000000class A {a:0}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0269.failure.json000066400000000000000000000001561331122015500255460ustar00rootroot00000000000000{ "index": 14, "lineNumber": 1, "column": 15, "message": "Error: Line 1: Unexpected token ," }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0269.js000066400000000000000000000000251331122015500235560ustar00rootroot00000000000000class A {a(){},b(){}}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0270.failure.json000066400000000000000000000002201331122015500255260ustar00rootroot00000000000000{ "index": 16, "lineNumber": 1, "column": 17, "message": "Error: Line 1: Classes may not have static property named prototype" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0270.js000066400000000000000000000000361331122015500235500ustar00rootroot00000000000000class A {static prototype(){}}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0271.failure.json000066400000000000000000000002201331122015500255270ustar00rootroot00000000000000{ "index": 16, "lineNumber": 1, "column": 17, "message": "Error: Line 1: Classes may not have static property named prototype" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0271.js000066400000000000000000000000401331122015500235440ustar00rootroot00000000000000class A {static "prototype"(){}}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0272.failure.json000066400000000000000000000002031331122015500255310ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Class constructor may not be an accessor" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0272.js000066400000000000000000000000351331122015500235510ustar00rootroot00000000000000class A {get constructor(){}}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0273.failure.json000066400000000000000000000002031331122015500255320ustar00rootroot00000000000000{ "index": 9, "lineNumber": 1, "column": 10, "message": "Error: Line 1: Class constructor may not be an accessor" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0273.js000066400000000000000000000000361331122015500235530ustar00rootroot00000000000000class A {set constructor(m){}}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0274.failure.json000066400000000000000000000002011331122015500255310ustar00rootroot00000000000000{ "index": 25, "lineNumber": 1, "column": 26, "message": "Error: Line 1: A class may only have one constructor" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0274.js000066400000000000000000000000531331122015500235530ustar00rootroot00000000000000class A {constructor(){} "constructor"(){}}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0275.failure.json000066400000000000000000000002061331122015500255370ustar00rootroot00000000000000{ "index": 11, "lineNumber": 1, "column": 12, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0275.js000066400000000000000000000000261331122015500235540ustar00rootroot00000000000000class A {a static(){}}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0276.failure.json000066400000000000000000000002061331122015500255400ustar00rootroot00000000000000{ "index": 23, "lineNumber": 1, "column": 24, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0276.js000066400000000000000000000000421331122015500235530ustar00rootroot00000000000000class A {static static static(){}}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0277.failure.json000066400000000000000000000001641331122015500255440ustar00rootroot00000000000000{ "index": 11, "lineNumber": 1, "column": 12, "message": "Error: Line 1: Unexpected reserved word" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0277.js000066400000000000000000000000231331122015500235530ustar00rootroot00000000000000class A {a(enum){}}esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0278.failure.json000066400000000000000000000002061331122015500255420ustar00rootroot00000000000000{ "index": 17, "lineNumber": 1, "column": 18, "message": "Error: Line 1: Use of future reserved word in strict mode" }esprima-4.0.1/test/fixtures/invalid-syntax/migrated_0278.js000066400000000000000000000000361331122015500235600ustar00rootroot00000000000000class A {static [static](){};}esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_implements.failure.json000066400000000000000000000002501331122015500312620ustar00rootroot00000000000000{"index":33,"lineNumber":1,"column":34,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"}esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_implements.js000066400000000000000000000000631331122015500273010ustar00rootroot00000000000000function hello() { "use strict"; implements = 1; } esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_interface.failure.json000066400000000000000000000002501331122015500310450ustar00rootroot00000000000000{"index":33,"lineNumber":1,"column":34,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"}esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_interface.js000066400000000000000000000000621331122015500270630ustar00rootroot00000000000000function hello() { "use strict"; interface = 1; } esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_let.failure.json000066400000000000000000000002501331122015500276710ustar00rootroot00000000000000{"index":33,"lineNumber":1,"column":34,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"}esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_let.js000066400000000000000000000000541331122015500257100ustar00rootroot00000000000000function hello() { "use strict"; let = 1; } esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_package.failure.json000066400000000000000000000002501331122015500305000ustar00rootroot00000000000000{"index":33,"lineNumber":1,"column":34,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"}esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_package.js000066400000000000000000000000601331122015500265140ustar00rootroot00000000000000function hello() { "use strict"; package = 1; } esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_private.failure.json000066400000000000000000000002501331122015500305570ustar00rootroot00000000000000{"index":33,"lineNumber":1,"column":34,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"}esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_private.js000066400000000000000000000000601331122015500265730ustar00rootroot00000000000000function hello() { "use strict"; private = 1; } esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_protected.failure.json000066400000000000000000000002501331122015500310760ustar00rootroot00000000000000{"index":33,"lineNumber":1,"column":34,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"}esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_protected.js000066400000000000000000000000621331122015500271140ustar00rootroot00000000000000function hello() { "use strict"; protected = 1; } esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_public.failure.json000066400000000000000000000002501331122015500303630ustar00rootroot00000000000000{"index":33,"lineNumber":1,"column":34,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"}esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_public.js000066400000000000000000000000571331122015500264050ustar00rootroot00000000000000function hello() { "use strict"; public = 1; } esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_static.failure.json000066400000000000000000000002501331122015500303740ustar00rootroot00000000000000{"index":33,"lineNumber":1,"column":34,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"}esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_static.js000066400000000000000000000000571331122015500264160ustar00rootroot00000000000000function hello() { "use strict"; static = 1; } esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_yield.failure.json000066400000000000000000000002501331122015500302130ustar00rootroot00000000000000{"index":33,"lineNumber":1,"column":34,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"}esprima-4.0.1/test/fixtures/invalid-syntax/strict_assignment_yield.js000066400000000000000000000000561331122015500262340ustar00rootroot00000000000000function hello() { "use strict"; yield = 1; } esprima-4.0.1/test/fixtures/statement/000077500000000000000000000000001331122015500200015ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/block/000077500000000000000000000000001331122015500210735ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/block/migrated_0000.js000066400000000000000000000000071331122015500236610ustar00rootroot00000000000000{ foo }esprima-4.0.1/test/fixtures/statement/block/migrated_0000.tree.json000066400000000000000000000060501331122015500251600ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "foo", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, "range": [ 2, 6 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "{", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Identifier", "value": "foo", "range": [ 2, 5 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "}", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/statement/block/migrated_0001.js000066400000000000000000000000271331122015500236640ustar00rootroot00000000000000{ doThis(); doThat(); }esprima-4.0.1/test/fixtures/statement/block/migrated_0001.tree.json000066400000000000000000000206261331122015500251660ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "doThis", "range": [ 2, 8 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 8 } } }, "arguments": [], "range": [ 2, 10 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 10 } } }, "range": [ 2, 11 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 11 } } }, { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "doThat", "range": [ 12, 18 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 18 } } }, "arguments": [], "range": [ 12, 20 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 20 } } }, "range": [ 12, 21 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "{", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Identifier", "value": "doThis", "range": [ 2, 8 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "(", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ")", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ";", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "doThat", "range": [ 12, 18 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "(", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ")", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": ";", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "}", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ], "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } esprima-4.0.1/test/fixtures/statement/block/migrated_0002.js000066400000000000000000000000021331122015500236560ustar00rootroot00000000000000{}esprima-4.0.1/test/fixtures/statement/block/migrated_0002.tree.json000066400000000000000000000027721331122015500251710ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "BlockStatement", "body": [], "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "{", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "}", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } } ], "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } } esprima-4.0.1/test/fixtures/statement/break/000077500000000000000000000000001331122015500210655ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/break/migrated_0000.js000066400000000000000000000000261331122015500236540ustar00rootroot00000000000000while (true) { break }esprima-4.0.1/test/fixtures/statement/break/migrated_0000.tree.json000066400000000000000000000121401331122015500251470ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "WhileStatement", "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "BreakStatement", "label": null, "range": [ 15, 21 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 13, 22 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "while", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Boolean", "value": "true", "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Keyword", "value": "break", "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "}", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ], "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } esprima-4.0.1/test/fixtures/statement/break/migrated_0001.js000066400000000000000000000000411331122015500236520ustar00rootroot00000000000000done: while (true) { break done }esprima-4.0.1/test/fixtures/statement/break/migrated_0001.tree.json000066400000000000000000000202611331122015500251530ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "LabeledStatement", "label": { "type": "Identifier", "name": "done", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "body": { "type": "WhileStatement", "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 13, 17 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 17 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "BreakStatement", "label": { "type": "Identifier", "name": "done", "range": [ 27, 31 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 31 } } }, "range": [ 21, 32 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 32 } } } ], "range": [ 19, 33 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 33 } } }, "range": [ 6, 33 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 33 } } }, "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "done", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": ":", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "while", "range": [ 6, 11 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "(", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Boolean", "value": "true", "range": [ 13, 17 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ")", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "{", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Keyword", "value": "break", "range": [ 21, 26 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "done", "range": [ 27, 31 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "}", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } } ], "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } } } esprima-4.0.1/test/fixtures/statement/break/migrated_0002.js000066400000000000000000000000421331122015500236540ustar00rootroot00000000000000done: while (true) { break done; }esprima-4.0.1/test/fixtures/statement/break/migrated_0002.tree.json000066400000000000000000000211131331122015500251510ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "LabeledStatement", "label": { "type": "Identifier", "name": "done", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "body": { "type": "WhileStatement", "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 13, 17 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 17 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "BreakStatement", "label": { "type": "Identifier", "name": "done", "range": [ 27, 31 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 31 } } }, "range": [ 21, 32 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 32 } } } ], "range": [ 19, 34 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 34 } } }, "range": [ 6, 34 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 34 } } }, "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "done", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": ":", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "while", "range": [ 6, 11 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "(", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Boolean", "value": "true", "range": [ 13, 17 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ")", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "{", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Keyword", "value": "break", "range": [ 21, 26 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "done", "range": [ 27, 31 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": ";", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } } ], "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } esprima-4.0.1/test/fixtures/statement/break/migrated_0003.js000066400000000000000000000000541331122015500236600ustar00rootroot00000000000000__proto__: while (true) { break __proto__; }esprima-4.0.1/test/fixtures/statement/break/migrated_0003.tree.json000066400000000000000000000211451331122015500251570ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "LabeledStatement", "label": { "type": "Identifier", "name": "__proto__", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "body": { "type": "WhileStatement", "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "BreakStatement", "label": { "type": "Identifier", "name": "__proto__", "range": [ 32, 41 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 41 } } }, "range": [ 26, 42 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 42 } } } ], "range": [ 24, 44 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 44 } } }, "range": [ 11, 44 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 44 } } }, "range": [ 0, 44 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 44 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "__proto__", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ":", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Keyword", "value": "while", "range": [ 11, 16 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "(", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Boolean", "value": "true", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "{", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Keyword", "value": "break", "range": [ 26, 31 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 31 } } }, { "type": "Identifier", "value": "__proto__", "range": [ 32, 41 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 41 } } }, { "type": "Punctuator", "value": ";", "range": [ 41, 42 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 42 } } }, { "type": "Punctuator", "value": "}", "range": [ 43, 44 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 44 } } } ], "range": [ 0, 44 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 44 } } } esprima-4.0.1/test/fixtures/statement/break/semicolon_newline.js000066400000000000000000000000641331122015500251340ustar00rootroot00000000000000while (true) { if (x) break ; else y; } esprima-4.0.1/test/fixtures/statement/break/semicolon_newline.tree.json000066400000000000000000000260601331122015500264330ustar00rootroot00000000000000{ "range": [ 0, 51 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 5, "column": 1 } }, "type": "Program", "body": [ { "range": [ 0, 51 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 5, "column": 1 } }, "type": "WhileStatement", "test": { "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } }, "type": "Literal", "value": true, "raw": "true" }, "body": { "range": [ 13, 51 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 5, "column": 1 } }, "type": "BlockStatement", "body": [ { "range": [ 19, 49 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 4, "column": 11 } }, "type": "IfStatement", "test": { "range": [ 23, 24 ], "loc": { "start": { "line": 2, "column": 8 }, "end": { "line": 2, "column": 9 } }, "type": "Identifier", "name": "x" }, "consequent": { "range": [ 26, 37 ], "loc": { "start": { "line": 2, "column": 11 }, "end": { "line": 3, "column": 5 } }, "type": "BreakStatement", "label": null }, "alternate": { "range": [ 47, 49 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 11 } }, "type": "ExpressionStatement", "expression": { "range": [ 47, 48 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 10 } }, "type": "Identifier", "name": "y" } } } ] } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "while", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Boolean", "value": "true", "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Keyword", "value": "if", "range": [ 19, 21 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 6 } } }, { "type": "Punctuator", "value": "(", "range": [ 22, 23 ], "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 8 } } }, { "type": "Identifier", "value": "x", "range": [ 23, 24 ], "loc": { "start": { "line": 2, "column": 8 }, "end": { "line": 2, "column": 9 } } }, { "type": "Punctuator", "value": ")", "range": [ 24, 25 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 2, "column": 10 } } }, { "type": "Keyword", "value": "break", "range": [ 26, 31 ], "loc": { "start": { "line": 2, "column": 11 }, "end": { "line": 2, "column": 16 } } }, { "type": "Punctuator", "value": ";", "range": [ 36, 37 ], "loc": { "start": { "line": 3, "column": 4 }, "end": { "line": 3, "column": 5 } } }, { "type": "Keyword", "value": "else", "range": [ 42, 46 ], "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 8 } } }, { "type": "Identifier", "value": "y", "range": [ 47, 48 ], "loc": { "start": { "line": 4, "column": 9 }, "end": { "line": 4, "column": 10 } } }, { "type": "Punctuator", "value": ";", "range": [ 48, 49 ], "loc": { "start": { "line": 4, "column": 10 }, "end": { "line": 4, "column": 11 } } }, { "type": "Punctuator", "value": "}", "range": [ 50, 51 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 1 } } } ] } esprima-4.0.1/test/fixtures/statement/continue/000077500000000000000000000000001331122015500216255ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/continue/migrated_0000.js000066400000000000000000000000321331122015500244110ustar00rootroot00000000000000while (true) { continue; }esprima-4.0.1/test/fixtures/statement/continue/migrated_0000.tree.json000066400000000000000000000130001331122015500257030ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "WhileStatement", "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "ContinueStatement", "label": null, "range": [ 15, 24 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 13, 26 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 26 } } }, "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "while", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Boolean", "value": "true", "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Keyword", "value": "continue", "range": [ 15, 23 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ";", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "}", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } } ], "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } esprima-4.0.1/test/fixtures/statement/continue/migrated_0001.js000066400000000000000000000000311331122015500244110ustar00rootroot00000000000000while (true) { continue }esprima-4.0.1/test/fixtures/statement/continue/migrated_0001.tree.json000066400000000000000000000121461331122015500257160ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "WhileStatement", "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "ContinueStatement", "label": null, "range": [ 15, 24 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 13, 25 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 25 } } }, "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "while", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Boolean", "value": "true", "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Keyword", "value": "continue", "range": [ 15, 23 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "}", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ], "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } esprima-4.0.1/test/fixtures/statement/continue/migrated_0002.js000066400000000000000000000000441331122015500244160ustar00rootroot00000000000000done: while (true) { continue done }esprima-4.0.1/test/fixtures/statement/continue/migrated_0002.tree.json000066400000000000000000000202671331122015500257220ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "LabeledStatement", "label": { "type": "Identifier", "name": "done", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "body": { "type": "WhileStatement", "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 13, 17 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 17 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "ContinueStatement", "label": { "type": "Identifier", "name": "done", "range": [ 30, 34 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 34 } } }, "range": [ 21, 35 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 35 } } } ], "range": [ 19, 36 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 36 } } }, "range": [ 6, 36 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 36 } } }, "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "done", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": ":", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "while", "range": [ 6, 11 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "(", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Boolean", "value": "true", "range": [ 13, 17 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ")", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "{", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Keyword", "value": "continue", "range": [ 21, 29 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 29 } } }, { "type": "Identifier", "value": "done", "range": [ 30, 34 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "}", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } } ], "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } esprima-4.0.1/test/fixtures/statement/continue/migrated_0003.js000066400000000000000000000000451331122015500244200ustar00rootroot00000000000000done: while (true) { continue done; }esprima-4.0.1/test/fixtures/statement/continue/migrated_0003.tree.json000066400000000000000000000211211331122015500257110ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "LabeledStatement", "label": { "type": "Identifier", "name": "done", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "body": { "type": "WhileStatement", "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 13, 17 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 17 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "ContinueStatement", "label": { "type": "Identifier", "name": "done", "range": [ 30, 34 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 34 } } }, "range": [ 21, 35 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 35 } } } ], "range": [ 19, 37 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 37 } } }, "range": [ 6, 37 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 37 } } }, "range": [ 0, 37 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 37 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "done", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": ":", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "while", "range": [ 6, 11 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "(", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Boolean", "value": "true", "range": [ 13, 17 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ")", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "{", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Keyword", "value": "continue", "range": [ 21, 29 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 29 } } }, { "type": "Identifier", "value": "done", "range": [ 30, 34 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ";", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": "}", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } } ], "range": [ 0, 37 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 37 } } } esprima-4.0.1/test/fixtures/statement/continue/migrated_0004.js000066400000000000000000000000571331122015500244240ustar00rootroot00000000000000__proto__: while (true) { continue __proto__; }esprima-4.0.1/test/fixtures/statement/continue/migrated_0004.tree.json000066400000000000000000000211531331122015500257170ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "LabeledStatement", "label": { "type": "Identifier", "name": "__proto__", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "body": { "type": "WhileStatement", "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "ContinueStatement", "label": { "type": "Identifier", "name": "__proto__", "range": [ 35, 44 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 44 } } }, "range": [ 26, 45 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 45 } } } ], "range": [ 24, 47 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 47 } } }, "range": [ 11, 47 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 47 } } }, "range": [ 0, 47 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 47 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "__proto__", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ":", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Keyword", "value": "while", "range": [ 11, 16 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "(", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Boolean", "value": "true", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "{", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Keyword", "value": "continue", "range": [ 26, 34 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 34 } } }, { "type": "Identifier", "value": "__proto__", "range": [ 35, 44 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 44 } } }, { "type": "Punctuator", "value": ";", "range": [ 44, 45 ], "loc": { "start": { "line": 1, "column": 44 }, "end": { "line": 1, "column": 45 } } }, { "type": "Punctuator", "value": "}", "range": [ 46, 47 ], "loc": { "start": { "line": 1, "column": 46 }, "end": { "line": 1, "column": 47 } } } ], "range": [ 0, 47 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 47 } } } esprima-4.0.1/test/fixtures/statement/debugger/000077500000000000000000000000001331122015500215655ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/debugger/migrated_0000.js000066400000000000000000000000111331122015500243460ustar00rootroot00000000000000debugger;esprima-4.0.1/test/fixtures/statement/debugger/migrated_0000.tree.json000066400000000000000000000027511331122015500256560ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "DebuggerStatement", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "debugger", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ";", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/statement/empty/000077500000000000000000000000001331122015500211375ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/empty/migrated_0000.js000066400000000000000000000000011331122015500237170ustar00rootroot00000000000000;esprima-4.0.1/test/fixtures/statement/empty/migrated_0000.tree.json000066400000000000000000000021141331122015500252210ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "EmptyStatement", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": ";", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } } ], "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } } esprima-4.0.1/test/fixtures/statement/expression/000077500000000000000000000000001331122015500222005ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/expression/migrated_0000.js000066400000000000000000000000011331122015500247600ustar00rootroot00000000000000xesprima-4.0.1/test/fixtures/statement/expression/migrated_0000.tree.json000066400000000000000000000030741331122015500262700ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } } ], "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } } esprima-4.0.1/test/fixtures/statement/expression/migrated_0001.js000066400000000000000000000000041331122015500247640ustar00rootroot00000000000000x, yesprima-4.0.1/test/fixtures/statement/expression/migrated_0001.tree.json000066400000000000000000000071401331122015500262670ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "SequenceExpression", "expressions": [ { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Identifier", "name": "y", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } } ], "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": ",", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "y", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } } ], "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } } esprima-4.0.1/test/fixtures/statement/expression/migrated_0002.source.js000066400000000000000000000000271331122015500262710ustar00rootroot00000000000000var source = '\\u0061';esprima-4.0.1/test/fixtures/statement/expression/migrated_0002.tree.json000066400000000000000000000031021331122015500262620ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "a", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "\\u0061", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/statement/expression/migrated_0003.source.js000066400000000000000000000000301331122015500262640ustar00rootroot00000000000000var source = 'a\\u0061';esprima-4.0.1/test/fixtures/statement/expression/migrated_0003.tree.json000066400000000000000000000031041331122015500262650ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "aa", "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "a\\u0061", "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/statement/expression/migrated_0004.source.js000066400000000000000000000000301331122015500262650ustar00rootroot00000000000000var source = '\\u0061a';esprima-4.0.1/test/fixtures/statement/expression/migrated_0004.tree.json000066400000000000000000000031041331122015500262660ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "aa", "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "\\u0061a", "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } esprima-4.0.1/test/fixtures/statement/expression/migrated_0005.source.js000066400000000000000000000000311331122015500262670ustar00rootroot00000000000000var source = '\\u0061a ';esprima-4.0.1/test/fixtures/statement/expression/migrated_0005.tree.json000066400000000000000000000031041331122015500262670ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "aa", "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "\\u0061a", "range": [ 0, 7 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } esprima-4.0.1/test/fixtures/statement/if/000077500000000000000000000000001331122015500203775ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/if/invalid-function-declaration1.failure.json000066400000000000000000000003701331122015500305350ustar00rootroot00000000000000{"index":23,"lineNumber":1,"column":24,"message":"Error: Line 1: In strict mode code, functions can only be declared at top level or inside a block","description":"In strict mode code, functions can only be declared at top level or inside a block"}esprima-4.0.1/test/fixtures/statement/if/invalid-function-declaration1.js000066400000000000000000000000471331122015500265530ustar00rootroot00000000000000"use strict"; if (true) function f(){} esprima-4.0.1/test/fixtures/statement/if/invalid-function-declaration2.failure.json000066400000000000000000000003701331122015500305360ustar00rootroot00000000000000{"index":23,"lineNumber":1,"column":24,"message":"Error: Line 1: In strict mode code, functions can only be declared at top level or inside a block","description":"In strict mode code, functions can only be declared at top level or inside a block"}esprima-4.0.1/test/fixtures/statement/if/invalid-function-declaration2.js000066400000000000000000000000571331122015500265550ustar00rootroot00000000000000"use strict"; if (true) function f(){} else {} esprima-4.0.1/test/fixtures/statement/if/invalid-function-declaration3.failure.json000066400000000000000000000003701331122015500305370ustar00rootroot00000000000000{"index":31,"lineNumber":1,"column":32,"message":"Error: Line 1: In strict mode code, functions can only be declared at top level or inside a block","description":"In strict mode code, functions can only be declared at top level or inside a block"}esprima-4.0.1/test/fixtures/statement/if/invalid-function-declaration3.js000066400000000000000000000000571331122015500265560ustar00rootroot00000000000000"use strict"; if (true) {} else function f(){} esprima-4.0.1/test/fixtures/statement/if/invalid-function-declaration4.failure.json000066400000000000000000000003701331122015500305400ustar00rootroot00000000000000{"index":23,"lineNumber":1,"column":24,"message":"Error: Line 1: In strict mode code, functions can only be declared at top level or inside a block","description":"In strict mode code, functions can only be declared at top level or inside a block"}esprima-4.0.1/test/fixtures/statement/if/invalid-function-declaration4.js000066400000000000000000000000731331122015500265550ustar00rootroot00000000000000"use strict"; if (true) function f(){} else function g(){} esprima-4.0.1/test/fixtures/statement/if/migrated_0000.js000066400000000000000000000000321331122015500231630ustar00rootroot00000000000000if (morning) goodMorning()esprima-4.0.1/test/fixtures/statement/if/migrated_0000.tree.json000066400000000000000000000132341331122015500244660ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "IfStatement", "test": { "type": "Identifier", "name": "morning", "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, "consequent": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "goodMorning", "range": [ 13, 24 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 24 } } }, "arguments": [], "range": [ 13, 26 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 26 } } }, "range": [ 13, 26 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 26 } } }, "alternate": null, "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "if", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "morning", "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "goodMorning", "range": [ 13, 24 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "(", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ")", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } } ], "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } esprima-4.0.1/test/fixtures/statement/if/migrated_0001.js000066400000000000000000000000331331122015500231650ustar00rootroot00000000000000if (morning) (function(){})esprima-4.0.1/test/fixtures/statement/if/migrated_0001.tree.json000066400000000000000000000166131331122015500244730ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "IfStatement", "test": { "type": "Identifier", "name": "morning", "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, "consequent": { "type": "ExpressionStatement", "expression": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 24, 26 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 26 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 26 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 26 } } }, "range": [ 13, 27 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 27 } } }, "alternate": null, "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "if", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "morning", "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "(", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Keyword", "value": "function", "range": [ 14, 22 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "(", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ")", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "{", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "}", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": ")", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } } ], "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } } } esprima-4.0.1/test/fixtures/statement/if/migrated_0002.js000066400000000000000000000000271331122015500231710ustar00rootroot00000000000000if (morning) var x = 0;esprima-4.0.1/test/fixtures/statement/if/migrated_0002.tree.json000066400000000000000000000165111331122015500244710ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "IfStatement", "test": { "type": "Identifier", "name": "morning", "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, "consequent": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, "init": { "type": "Literal", "value": 0, "raw": "0", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, "range": [ 17, 22 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 22 } } } ], "kind": "var", "range": [ 13, 23 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 23 } } }, "alternate": null, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "if", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "morning", "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Keyword", "value": "var", "range": [ 13, 16 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "x", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "=", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Numeric", "value": "0", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ";", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ], "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } esprima-4.0.1/test/fixtures/statement/if/migrated_0003.js000066400000000000000000000000331331122015500231670ustar00rootroot00000000000000if (morning) function a(){}esprima-4.0.1/test/fixtures/statement/if/migrated_0003.tree.json000066400000000000000000000156121331122015500244730ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "IfStatement", "test": { "type": "Identifier", "name": "morning", "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, "consequent": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "a", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 25, 27 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 27 } } }, "generator": false, "expression": false, "async": false, "range": [ 13, 27 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 27 } } }, "alternate": null, "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "if", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "morning", "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Keyword", "value": "function", "range": [ 13, 21 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "a", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "(", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": ")", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "{", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "}", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } } ], "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } } } esprima-4.0.1/test/fixtures/statement/if/migrated_0004.js000066400000000000000000000000521331122015500231710ustar00rootroot00000000000000if (morning) goodMorning(); else goodDay()esprima-4.0.1/test/fixtures/statement/if/migrated_0004.tree.json000066400000000000000000000224371331122015500244770ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "IfStatement", "test": { "type": "Identifier", "name": "morning", "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, "consequent": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "goodMorning", "range": [ 13, 24 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 24 } } }, "arguments": [], "range": [ 13, 26 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 26 } } }, "range": [ 13, 27 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 27 } } }, "alternate": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "goodDay", "range": [ 33, 40 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 40 } } }, "arguments": [], "range": [ 33, 42 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 42 } } }, "range": [ 33, 42 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 42 } } }, "range": [ 0, 42 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 42 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "if", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "morning", "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "goodMorning", "range": [ 13, 24 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "(", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ")", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": ";", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Keyword", "value": "else", "range": [ 28, 32 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 32 } } }, { "type": "Identifier", "value": "goodDay", "range": [ 33, 40 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 40 } } }, { "type": "Punctuator", "value": "(", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } }, { "type": "Punctuator", "value": ")", "range": [ 41, 42 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 42 } } } ], "range": [ 0, 42 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 42 } } } esprima-4.0.1/test/fixtures/statement/if/migrated_0005.js000066400000000000000000000000301331122015500231660ustar00rootroot00000000000000if (true) that() ; else;esprima-4.0.1/test/fixtures/statement/if/migrated_0005.tree.json000066400000000000000000000164211331122015500244740ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "IfStatement", "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 4, 8 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 8 } } }, "consequent": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "that", "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } }, "arguments": [], "range": [ 10, 16 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 16 } } }, "range": [ 10, 18 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 2, "column": 1 } } }, "alternate": { "type": "EmptyStatement", "range": [ 23, 24 ], "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 7 } } }, "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 7 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "if", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Boolean", "value": "true", "range": [ 4, 8 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "that", "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ";", "range": [ 17, 18 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 1 } } }, { "type": "Keyword", "value": "else", "range": [ 19, 23 ], "loc": { "start": { "line": 2, "column": 2 }, "end": { "line": 2, "column": 6 } } }, { "type": "Punctuator", "value": ";", "range": [ 23, 24 ], "loc": { "start": { "line": 2, "column": 6 }, "end": { "line": 2, "column": 7 } } } ], "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 7 } } } esprima-4.0.1/test/fixtures/statement/if/migrated_0006.js000066400000000000000000000000271331122015500231750ustar00rootroot00000000000000if (true) that(); else;esprima-4.0.1/test/fixtures/statement/if/migrated_0006.tree.json000066400000000000000000000164341331122015500245010ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "IfStatement", "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 4, 8 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 8 } } }, "consequent": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "that", "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } }, "arguments": [], "range": [ 10, 16 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 16 } } }, "range": [ 10, 17 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 17 } } }, "alternate": { "type": "EmptyStatement", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "if", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Boolean", "value": "true", "range": [ 4, 8 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "that", "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ";", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Keyword", "value": "else", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ";", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ], "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } esprima-4.0.1/test/fixtures/statement/iteration/000077500000000000000000000000001331122015500217775ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/iteration/const_forin.js000066400000000000000000000000421331122015500246540ustar00rootroot00000000000000for (const x in list) process(x); esprima-4.0.1/test/fixtures/statement/iteration/const_forin.tree.json000066400000000000000000000242721331122015500261620ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForInStatement", "left": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, "init": null, "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } } ], "kind": "const", "range": [ 5, 12 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 12 } } }, "right": { "type": "Identifier", "name": "list", "range": [ 16, 20 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 20 } } }, "body": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "process", "range": [ 22, 29 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 29 } } }, "arguments": [ { "type": "Identifier", "name": "x", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 22, 32 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 32 } } }, "range": [ 22, 33 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 33 } } }, "each": false, "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "const", "range": [ 5, 10 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "x", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Keyword", "value": "in", "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "list", "range": [ 16, 20 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": ")", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "process", "range": [ 22, 29 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "(", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Identifier", "value": "x", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": ")", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": ";", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } } ], "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } } } esprima-4.0.1/test/fixtures/statement/iteration/for-in-let.js000066400000000000000000000000221331122015500243030ustar00rootroot00000000000000for (x in let) {} esprima-4.0.1/test/fixtures/statement/iteration/for-in-let.tree.json000066400000000000000000000125161331122015500256110ustar00rootroot00000000000000{ "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } }, "type": "Program", "body": [ { "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } }, "type": "ForInStatement", "left": { "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } }, "type": "Identifier", "name": "x" }, "right": { "range": [ 10, 13 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 13 } }, "type": "Identifier", "name": "let" }, "body": { "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } }, "type": "BlockStatement", "body": [] }, "each": false } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "x", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Keyword", "value": "in", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "let", "range": [ 10, 13 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "{", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "}", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } } ] } esprima-4.0.1/test/fixtures/statement/iteration/for-let-let.js000066400000000000000000000000271331122015500244660ustar00rootroot00000000000000for (let x = let;;) {} esprima-4.0.1/test/fixtures/statement/iteration/for-let-let.tree.json000066400000000000000000000201371331122015500257650ustar00rootroot00000000000000{ "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } }, "type": "Program", "body": [ { "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } }, "type": "ForStatement", "init": { "range": [ 5, 17 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 17 } }, "type": "VariableDeclaration", "declarations": [ { "range": [ 9, 16 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 16 } }, "type": "VariableDeclarator", "id": { "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } }, "type": "Identifier", "name": "x" }, "init": { "range": [ 13, 16 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 16 } }, "type": "Identifier", "name": "let" } } ], "kind": "let" }, "test": null, "update": null, "body": { "range": [ 20, 22 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 22 } }, "type": "BlockStatement", "body": [] } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "let", "range": [ 5, 8 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "x", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "=", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Keyword", "value": "let", "range": [ 13, 16 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ";", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ";", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "{", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "}", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ] } esprima-4.0.1/test/fixtures/statement/iteration/for-statement-with-seq.js000066400000000000000000000000161331122015500266610ustar00rootroot00000000000000for(a,b,c;;); esprima-4.0.1/test/fixtures/statement/iteration/for-statement-with-seq.tree.json000066400000000000000000000176071331122015500301720ustar00rootroot00000000000000{ "type": "Program", "body": [ { "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } }, "type": "ForStatement", "init": { "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } }, "type": "SequenceExpression", "expressions": [ { "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } }, "type": "Identifier", "name": "a" }, { "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } }, "type": "Identifier", "name": "b" }, { "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } }, "type": "Identifier", "name": "c" } ] }, "test": null, "update": null, "body": { "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } }, "type": "EmptyStatement" } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "a", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ",", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "b", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ",", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "c", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ";", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ";", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } esprima-4.0.1/test/fixtures/statement/iteration/invalid-assign-for-in.failure.json000066400000000000000000000002221331122015500304140ustar00rootroot00000000000000{"index":8,"lineNumber":1,"column":9,"message":"Error: Line 1: Invalid left-hand side in for-in","description":"Invalid left-hand side in for-in"}esprima-4.0.1/test/fixtures/statement/iteration/invalid-assign-for-in.js000066400000000000000000000000201331122015500264250ustar00rootroot00000000000000for (x=0 in y); esprima-4.0.1/test/fixtures/statement/iteration/invalid-strict-for-in-let.failure.json000066400000000000000000000002501331122015500312230ustar00rootroot00000000000000{"index":24,"lineNumber":1,"column":25,"message":"Error: Line 1: Use of future reserved word in strict mode","description":"Use of future reserved word in strict mode"}esprima-4.0.1/test/fixtures/statement/iteration/invalid-strict-for-in-let.js000066400000000000000000000000401331122015500272350ustar00rootroot00000000000000"use strict"; for (x in let) {} esprima-4.0.1/test/fixtures/statement/iteration/migrated_0000.js000066400000000000000000000000271331122015500245670ustar00rootroot00000000000000do keep(); while (true)esprima-4.0.1/test/fixtures/statement/iteration/migrated_0000.tree.json000066400000000000000000000146451331122015500260750ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "DoWhileStatement", "body": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "keep", "range": [ 3, 7 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 7 } } }, "arguments": [], "range": [ 3, 9 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 9 } } }, "range": [ 3, 10 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 10 } } }, "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "do", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "keep", "range": [ 3, 7 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "(", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ";", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Keyword", "value": "while", "range": [ 11, 16 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "(", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Boolean", "value": "true", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ], "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0001.js000066400000000000000000000000301331122015500245620ustar00rootroot00000000000000do keep(); while (true);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0001.tree.json000066400000000000000000000154771331122015500261020ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "DoWhileStatement", "body": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "keep", "range": [ 3, 7 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 7 } } }, "arguments": [], "range": [ 3, 9 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 9 } } }, "range": [ 3, 10 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 10 } } }, "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "do", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "keep", "range": [ 3, 7 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "(", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ";", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Keyword", "value": "while", "range": [ 11, 16 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "(", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Boolean", "value": "true", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ";", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0002.js000066400000000000000000000000371331122015500245720ustar00rootroot00000000000000do { x++; y--; } while (x < 10)esprima-4.0.1/test/fixtures/statement/iteration/migrated_0002.tree.json000066400000000000000000000317211331122015500260710ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "DoWhileStatement", "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "x", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "prefix": false, "range": [ 5, 8 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 8 } } }, "range": [ 5, 9 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 9 } } }, { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "--", "argument": { "type": "Identifier", "name": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "prefix": false, "range": [ 10, 13 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 13 } } }, "range": [ 10, 14 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 14 } } } ], "range": [ 3, 16 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 16 } } }, "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "x", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, "right": { "type": "Literal", "value": 10, "raw": "10", "range": [ 28, 30 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 30 } } }, "range": [ 24, 30 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 30 } } }, "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "do", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "{", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "x", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "++", "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ";", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "--", "range": [ 11, 13 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ";", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "}", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Keyword", "value": "while", "range": [ 17, 22 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "(", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Identifier", "value": "x", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "<", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Numeric", "value": "10", "range": [ 28, 30 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": ")", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0003.js000066400000000000000000000000361331122015500245720ustar00rootroot00000000000000{ do { } while (false) false }esprima-4.0.1/test/fixtures/statement/iteration/migrated_0003.tree.json000066400000000000000000000172561331122015500261010ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "BlockStatement", "body": [ { "type": "DoWhileStatement", "body": { "type": "BlockStatement", "body": [], "range": [ 5, 8 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 8 } } }, "test": { "type": "Literal", "value": false, "raw": "false", "range": [ 16, 21 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 21 } } }, "range": [ 2, 22 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 22 } } }, { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": false, "raw": "false", "range": [ 23, 28 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 28 } } }, "range": [ 23, 29 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 29 } } } ], "range": [ 0, 30 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "{", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "do", "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "{", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "}", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Keyword", "value": "while", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "(", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Boolean", "value": "false", "range": [ 16, 21 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ")", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Boolean", "value": "false", "range": [ 23, 28 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "}", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } } ], "range": [ 0, 30 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 30 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0004.js000066400000000000000000000000261331122015500245720ustar00rootroot00000000000000do that();while (true)esprima-4.0.1/test/fixtures/statement/iteration/migrated_0004.tree.json000066400000000000000000000146451331122015500261010ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "DoWhileStatement", "body": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "that", "range": [ 3, 7 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 7 } } }, "arguments": [], "range": [ 3, 9 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 9 } } }, "range": [ 3, 10 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 10 } } }, "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 17, 21 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "do", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "that", "range": [ 3, 7 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "(", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ";", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Keyword", "value": "while", "range": [ 10, 15 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "(", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Boolean", "value": "true", "range": [ 17, 21 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ")", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ], "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0005.js000066400000000000000000000000271331122015500245740ustar00rootroot00000000000000do that() ;while (true)esprima-4.0.1/test/fixtures/statement/iteration/migrated_0005.tree.json000066400000000000000000000146361331122015500261020ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "DoWhileStatement", "body": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "that", "range": [ 3, 7 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 7 } } }, "arguments": [], "range": [ 3, 9 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 9 } } }, "range": [ 3, 11 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 2, "column": 1 } } }, "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 18, 22 ], "loc": { "start": { "line": 2, "column": 8 }, "end": { "line": 2, "column": 12 } } }, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 13 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "do", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "that", "range": [ 3, 7 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "(", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ";", "range": [ 10, 11 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 1 } } }, { "type": "Keyword", "value": "while", "range": [ 11, 16 ], "loc": { "start": { "line": 2, "column": 1 }, "end": { "line": 2, "column": 6 } } }, { "type": "Punctuator", "value": "(", "range": [ 17, 18 ], "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 8 } } }, { "type": "Boolean", "value": "true", "range": [ 18, 22 ], "loc": { "start": { "line": 2, "column": 8 }, "end": { "line": 2, "column": 12 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 2, "column": 12 }, "end": { "line": 2, "column": 13 } } } ], "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 13 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0006.js000066400000000000000000000000321331122015500245710ustar00rootroot00000000000000while (true) doSomething()esprima-4.0.1/test/fixtures/statement/iteration/migrated_0006.tree.json000066400000000000000000000132171331122015500260750ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "WhileStatement", "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } } }, "body": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "doSomething", "range": [ 13, 24 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 24 } } }, "arguments": [], "range": [ 13, 26 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 26 } } }, "range": [ 13, 26 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 26 } } }, "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "while", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Boolean", "value": "true", "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "doSomething", "range": [ 13, 24 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "(", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ")", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } } ], "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0007.js000066400000000000000000000000341331122015500245740ustar00rootroot00000000000000while (x < 10) { x++; y--; }esprima-4.0.1/test/fixtures/statement/iteration/migrated_0007.tree.json000066400000000000000000000311051331122015500260720ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "WhileStatement", "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, "right": { "type": "Literal", "value": 10, "raw": "10", "range": [ 11, 13 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 13 } } }, "range": [ 7, 13 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 13 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "x", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, "prefix": false, "range": [ 17, 20 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 20 } } }, "range": [ 17, 21 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 21 } } }, { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "--", "argument": { "type": "Identifier", "name": "y", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "prefix": false, "range": [ 22, 25 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 25 } } }, "range": [ 22, 26 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 26 } } } ], "range": [ 15, 28 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 28 } } }, "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "while", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "x", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "<", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Numeric", "value": "10", "range": [ 11, 13 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "{", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "x", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "++", "range": [ 18, 20 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": ";", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "y", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "--", "range": [ 23, 25 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ";", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "}", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } } ], "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0008.js000066400000000000000000000000101331122015500245670ustar00rootroot00000000000000for(;;);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0008.tree.json000066400000000000000000000071231331122015500260760ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForStatement", "init": null, "test": null, "update": null, "body": { "type": "EmptyStatement", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": ";", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ";", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": ")", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ";", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } } ], "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0009.js000066400000000000000000000000111331122015500245710ustar00rootroot00000000000000for(;;){}esprima-4.0.1/test/fixtures/statement/iteration/migrated_0009.tree.json000066400000000000000000000100051331122015500260700ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForStatement", "init": null, "test": null, "update": null, "body": { "type": "BlockStatement", "body": [], "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": ";", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ";", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": ")", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "}", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0010.js000066400000000000000000000000151331122015500245650ustar00rootroot00000000000000for(x = 0;;);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0010.tree.json000066400000000000000000000145701331122015500260730ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForStatement", "init": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, "test": null, "update": null, "body": { "type": "EmptyStatement", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Numeric", "value": "0", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ";", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ";", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0011.js000066400000000000000000000000211331122015500245630ustar00rootroot00000000000000for(var x = 0;;);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0011.tree.json000066400000000000000000000173051331122015500260730ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForStatement", "init": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "init": { "type": "Literal", "value": 0, "raw": "0", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, "range": [ 8, 13 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 13 } } } ], "kind": "var", "range": [ 4, 13 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 13 } } }, "test": null, "update": null, "body": { "type": "EmptyStatement", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Keyword", "value": "var", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "=", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Numeric", "value": "0", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ";", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ";", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ";", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } } ], "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0012.js000066400000000000000000000000211331122015500245640ustar00rootroot00000000000000for(let x = 0;;);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0012.tree.json000066400000000000000000000173051331122015500260740ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForStatement", "init": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "init": { "type": "Literal", "value": 0, "raw": "0", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, "range": [ 8, 13 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 13 } } } ], "kind": "let", "range": [ 4, 14 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 14 } } }, "test": null, "update": null, "body": { "type": "EmptyStatement", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Keyword", "value": "let", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "=", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Numeric", "value": "0", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ";", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ";", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ";", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } } ], "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0013.js000066400000000000000000000000301331122015500245650ustar00rootroot00000000000000for(var x = 0, y = 1;;);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0013.tree.json000066400000000000000000000264421331122015500260770ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForStatement", "init": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "init": { "type": "Literal", "value": 0, "raw": "0", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, "range": [ 8, 13 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 13 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "y", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, "init": { "type": "Literal", "value": 1, "raw": "1", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, "range": [ 15, 20 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 20 } } } ], "kind": "var", "range": [ 4, 20 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 20 } } }, "test": null, "update": null, "body": { "type": "EmptyStatement", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Keyword", "value": "var", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "=", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Numeric", "value": "0", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ",", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "y", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "=", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Numeric", "value": "1", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": ";", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ";", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ";", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0014.js000066400000000000000000000000241331122015500245710ustar00rootroot00000000000000for(x = 0; x < 42;);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0014.tree.json000066400000000000000000000222361331122015500260750ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForStatement", "init": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "x", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } } }, "range": [ 11, 17 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 17 } } }, "update": null, "body": { "type": "EmptyStatement", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Numeric", "value": "0", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ";", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "x", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "<", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Numeric", "value": "42", "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ";", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ";", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } } ], "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0015.js000066400000000000000000000000301331122015500245670ustar00rootroot00000000000000for(x = 0; x < 42; x++);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0015.tree.json000066400000000000000000000260031331122015500260720ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForStatement", "init": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "x", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } } }, "range": [ 11, 17 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 17 } } }, "update": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "x", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, "prefix": false, "range": [ 19, 22 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 22 } } }, "body": { "type": "EmptyStatement", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Numeric", "value": "0", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ";", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "x", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "<", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Numeric", "value": "42", "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ";", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "x", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "++", "range": [ 20, 22 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ";", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0016.js000066400000000000000000000000431331122015500245740ustar00rootroot00000000000000for(x = 0; x < 42; x++) process(x);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0016.tree.json000066400000000000000000000350031331122015500260730ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForStatement", "init": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "x", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } } }, "range": [ 11, 17 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 17 } } }, "update": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "x", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, "prefix": false, "range": [ 19, 22 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 22 } } }, "body": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "process", "range": [ 24, 31 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 31 } } }, "arguments": [ { "type": "Identifier", "name": "x", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } } ], "range": [ 24, 34 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 34 } } }, "range": [ 24, 35 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 35 } } }, "range": [ 0, 35 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 35 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Numeric", "value": "0", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ";", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "x", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "<", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Numeric", "value": "42", "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ";", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "x", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "++", "range": [ 20, 22 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "process", "range": [ 24, 31 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "(", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Identifier", "value": "x", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": ")", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ";", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } } ], "range": [ 0, 35 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 35 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0017.js000066400000000000000000000000321331122015500245730ustar00rootroot00000000000000for(x in list) process(x);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0017.tree.json000066400000000000000000000206311331122015500260750ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForInStatement", "left": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Identifier", "name": "list", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, "body": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "process", "range": [ 15, 22 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 22 } } }, "arguments": [ { "type": "Identifier", "name": "x", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 15, 25 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 25 } } }, "range": [ 15, 26 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 26 } } }, "each": false, "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "in", "range": [ 6, 8 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "list", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "process", "range": [ 15, 22 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "(", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "x", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": ")", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ";", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } } ], "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0018.js000066400000000000000000000000371331122015500246010ustar00rootroot00000000000000for (var x in list) process(x);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0018.tree.json000066400000000000000000000242561331122015500261050ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForInStatement", "left": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "init": null, "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } } ], "kind": "var", "range": [ 5, 10 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 10 } } }, "right": { "type": "Identifier", "name": "list", "range": [ 14, 18 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 18 } } }, "body": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "process", "range": [ 20, 27 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 27 } } }, "arguments": [ { "type": "Identifier", "name": "x", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } } ], "range": [ 20, 30 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 30 } } }, "range": [ 20, 31 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 31 } } }, "each": false, "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "var", "range": [ 5, 8 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "x", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Keyword", "value": "in", "range": [ 11, 13 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "list", "range": [ 14, 18 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "value": "process", "range": [ 20, 27 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "(", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Identifier", "value": "x", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": ")", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": ";", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0019.js000066400000000000000000000000441331122015500246000ustar00rootroot00000000000000for (var x = 42 in list) process(x);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0019.tree.json000066400000000000000000000272411331122015500261030ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForInStatement", "left": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "init": { "type": "Literal", "value": 42, "raw": "42", "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, "range": [ 9, 15 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 15 } } } ], "kind": "var", "range": [ 5, 15 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 15 } } }, "right": { "type": "Identifier", "name": "list", "range": [ 19, 23 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 23 } } }, "body": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "process", "range": [ 25, 32 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 32 } } }, "arguments": [ { "type": "Identifier", "name": "x", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } } ], "range": [ 25, 35 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 35 } } }, "range": [ 25, 36 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 36 } } }, "each": false, "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "var", "range": [ 5, 8 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "x", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "=", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Numeric", "value": "42", "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, { "type": "Keyword", "value": "in", "range": [ 16, 18 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "list", "range": [ 19, 23 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ")", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Identifier", "value": "process", "range": [ 25, 32 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "(", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Identifier", "value": "x", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ")", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": ";", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } } ], "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0020.js000066400000000000000000000000371331122015500245720ustar00rootroot00000000000000for (let x in list) process(x);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0020.tree.json000066400000000000000000000242561331122015500260760ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForInStatement", "left": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "init": null, "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } } ], "kind": "let", "range": [ 5, 10 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 10 } } }, "right": { "type": "Identifier", "name": "list", "range": [ 14, 18 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 18 } } }, "body": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "process", "range": [ 20, 27 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 27 } } }, "arguments": [ { "type": "Identifier", "name": "x", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } } ], "range": [ 20, 30 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 30 } } }, "range": [ 20, 31 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 31 } } }, "each": false, "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "let", "range": [ 5, 8 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "x", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Keyword", "value": "in", "range": [ 11, 13 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "list", "range": [ 14, 18 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "value": "process", "range": [ 20, 27 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "(", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Identifier", "value": "x", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": ")", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": ";", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0021.js000066400000000000000000000000311331122015500245650ustar00rootroot00000000000000for (var x = y = z in q);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0021.tree.json000066400000000000000000000247141331122015500260760ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForInStatement", "left": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "init": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "y", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, "range": [ 13, 18 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 18 } } }, "range": [ 9, 18 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } } } ], "kind": "var", "range": [ 5, 18 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 18 } } }, "right": { "type": "Identifier", "name": "q", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "body": { "type": "EmptyStatement", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, "each": false, "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "var", "range": [ 5, 8 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "x", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "=", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "y", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "=", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "z", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Keyword", "value": "in", "range": [ 19, 21 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "q", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ")", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": ";", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ], "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0022.js000066400000000000000000000000441331122015500245720ustar00rootroot00000000000000for (var a = b = c = (d in e) in z);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0022.tree.json000066400000000000000000000405251331122015500260750ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForInStatement", "left": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "a", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "init": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "b", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, "right": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "c", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, "right": { "type": "BinaryExpression", "operator": "in", "left": { "type": "Identifier", "name": "d", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, "right": { "type": "Identifier", "name": "e", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, "range": [ 22, 28 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 28 } } }, "range": [ 17, 29 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 29 } } }, "range": [ 13, 29 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 29 } } }, "range": [ 9, 29 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 29 } } } ], "kind": "var", "range": [ 5, 29 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 29 } } }, "right": { "type": "Identifier", "name": "z", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, "body": { "type": "EmptyStatement", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, "each": false, "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "var", "range": [ 5, 8 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "a", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "=", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "b", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "=", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "c", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "=", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "(", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "d", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Keyword", "value": "in", "range": [ 24, 26 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "e", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": ")", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Keyword", "value": "in", "range": [ 30, 32 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 32 } } }, { "type": "Identifier", "value": "z", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ")", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": ";", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } } ], "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0023.js000066400000000000000000000001001331122015500245640ustar00rootroot00000000000000for (var i = function() { return 10 in [] } in list) process(x);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0023.tree.json000066400000000000000000000502711331122015500260750ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForInStatement", "left": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "i", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "init": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "BinaryExpression", "operator": "in", "left": { "type": "Literal", "value": 10, "raw": "10", "range": [ 33, 35 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 35 } } }, "right": { "type": "ArrayExpression", "elements": [], "range": [ 39, 41 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 41 } } }, "range": [ 33, 41 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 41 } } }, "range": [ 26, 42 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 42 } } } ], "range": [ 24, 43 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 43 } } }, "generator": false, "expression": false, "async": false, "range": [ 13, 43 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 43 } } }, "range": [ 9, 43 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 43 } } } ], "kind": "var", "range": [ 5, 43 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 43 } } }, "right": { "type": "Identifier", "name": "list", "range": [ 47, 51 ], "loc": { "start": { "line": 1, "column": 47 }, "end": { "line": 1, "column": 51 } } }, "body": { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "process", "range": [ 53, 60 ], "loc": { "start": { "line": 1, "column": 53 }, "end": { "line": 1, "column": 60 } } }, "arguments": [ { "type": "Identifier", "name": "x", "range": [ 61, 62 ], "loc": { "start": { "line": 1, "column": 61 }, "end": { "line": 1, "column": 62 } } } ], "range": [ 53, 63 ], "loc": { "start": { "line": 1, "column": 53 }, "end": { "line": 1, "column": 63 } } }, "range": [ 53, 64 ], "loc": { "start": { "line": 1, "column": 53 }, "end": { "line": 1, "column": 64 } } }, "each": false, "range": [ 0, 64 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 64 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "var", "range": [ 5, 8 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "i", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "=", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Keyword", "value": "function", "range": [ 13, 21 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "(", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "{", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Keyword", "value": "return", "range": [ 26, 32 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 32 } } }, { "type": "Numeric", "value": "10", "range": [ 33, 35 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 35 } } }, { "type": "Keyword", "value": "in", "range": [ 36, 38 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": "[", "range": [ 39, 40 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 40 } } }, { "type": "Punctuator", "value": "]", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } }, { "type": "Punctuator", "value": "}", "range": [ 42, 43 ], "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 43 } } }, { "type": "Keyword", "value": "in", "range": [ 44, 46 ], "loc": { "start": { "line": 1, "column": 44 }, "end": { "line": 1, "column": 46 } } }, { "type": "Identifier", "value": "list", "range": [ 47, 51 ], "loc": { "start": { "line": 1, "column": 47 }, "end": { "line": 1, "column": 51 } } }, { "type": "Punctuator", "value": ")", "range": [ 51, 52 ], "loc": { "start": { "line": 1, "column": 51 }, "end": { "line": 1, "column": 52 } } }, { "type": "Identifier", "value": "process", "range": [ 53, 60 ], "loc": { "start": { "line": 1, "column": 53 }, "end": { "line": 1, "column": 60 } } }, { "type": "Punctuator", "value": "(", "range": [ 60, 61 ], "loc": { "start": { "line": 1, "column": 60 }, "end": { "line": 1, "column": 61 } } }, { "type": "Identifier", "value": "x", "range": [ 61, 62 ], "loc": { "start": { "line": 1, "column": 61 }, "end": { "line": 1, "column": 62 } } }, { "type": "Punctuator", "value": ")", "range": [ 62, 63 ], "loc": { "start": { "line": 1, "column": 62 }, "end": { "line": 1, "column": 63 } } }, { "type": "Punctuator", "value": ";", "range": [ 63, 64 ], "loc": { "start": { "line": 1, "column": 63 }, "end": { "line": 1, "column": 64 } } } ], "range": [ 0, 64 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 64 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0024.js000066400000000000000000000000251331122015500245730ustar00rootroot00000000000000for (a[b in c] in d);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0024.tree.json000066400000000000000000000223721331122015500260770ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForInStatement", "left": { "type": "MemberExpression", "computed": true, "object": { "type": "Identifier", "name": "a", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "property": { "type": "BinaryExpression", "operator": "in", "left": { "type": "Identifier", "name": "b", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, "right": { "type": "Identifier", "name": "c", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, "range": [ 7, 13 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 13 } } }, "range": [ 5, 14 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 14 } } }, "right": { "type": "Identifier", "name": "d", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, "body": { "type": "EmptyStatement", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, "each": false, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "a", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "[", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "b", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Keyword", "value": "in", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "c", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "]", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Keyword", "value": "in", "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "d", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ")", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": ";", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0025.js000066400000000000000000000000301331122015500245700ustar00rootroot00000000000000for (a(b in c)[0] in d);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0025.tree.json000066400000000000000000000301171331122015500260740ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForInStatement", "left": { "type": "MemberExpression", "computed": true, "object": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "a", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "arguments": [ { "type": "BinaryExpression", "operator": "in", "left": { "type": "Identifier", "name": "b", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, "right": { "type": "Identifier", "name": "c", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, "range": [ 7, 13 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 5, 14 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 14 } } }, "property": { "type": "Literal", "value": 0, "raw": "0", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, "range": [ 5, 17 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 17 } } }, "right": { "type": "Identifier", "name": "d", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, "body": { "type": "EmptyStatement", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, "each": false, "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "a", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "b", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Keyword", "value": "in", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "c", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "[", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Numeric", "value": "0", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "]", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Keyword", "value": "in", "range": [ 18, 20 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "d", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ";", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } esprima-4.0.1/test/fixtures/statement/iteration/migrated_0026.js000066400000000000000000000000201331122015500245700ustar00rootroot00000000000000for (a.in in a);esprima-4.0.1/test/fixtures/statement/iteration/migrated_0026.tree.json000066400000000000000000000154621331122015500261030ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForInStatement", "left": { "type": "MemberExpression", "computed": false, "object": { "type": "Identifier", "name": "a", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "property": { "type": "Identifier", "name": "in", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, "range": [ 5, 9 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 9 } } }, "right": { "type": "Identifier", "name": "a", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, "body": { "type": "EmptyStatement", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, "each": false, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "a", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": ".", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Keyword", "value": "in", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, { "type": "Keyword", "value": "in", "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "a", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ")", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ";", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/statement/iteration/pattern-in-for-in.js000066400000000000000000000000701331122015500256030ustar00rootroot00000000000000for([a,b[a],{c,d=e,[f]:[g,h().a,(0).k,...i[0]]}] in 0); esprima-4.0.1/test/fixtures/statement/iteration/pattern-in-for-in.tree.json000066400000000000000000001350731331122015500271120ustar00rootroot00000000000000{ "type": "Program", "body": [ { "range": [ 0, 55 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 55 } }, "type": "ForInStatement", "left": { "range": [ 4, 48 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 48 } }, "type": "ArrayPattern", "elements": [ { "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } }, "type": "Identifier", "name": "a" }, { "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } }, "type": "MemberExpression", "computed": true, "object": { "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } }, "type": "Identifier", "name": "b" }, "property": { "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } }, "type": "Identifier", "name": "a" } }, { "range": [ 12, 47 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 47 } }, "type": "ObjectPattern", "properties": [ { "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } }, "type": "Property", "key": { "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } }, "type": "Identifier", "name": "c" }, "computed": false, "value": { "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } }, "type": "Identifier", "name": "c" }, "kind": "init", "method": false, "shorthand": true }, { "range": [ 15, 18 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 18 } }, "type": "Property", "key": { "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } }, "type": "Identifier", "name": "d" }, "computed": false, "value": { "range": [ 15, 18 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 18 } }, "type": "AssignmentPattern", "left": { "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } }, "type": "Identifier", "name": "d" }, "right": { "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } }, "type": "Identifier", "name": "e" } }, "kind": "init", "method": false, "shorthand": true }, { "range": [ 19, 46 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 46 } }, "type": "Property", "key": { "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } }, "type": "Identifier", "name": "f" }, "computed": true, "value": { "range": [ 23, 46 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 46 } }, "type": "ArrayPattern", "elements": [ { "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } }, "type": "Identifier", "name": "g" }, { "range": [ 26, 31 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 31 } }, "type": "MemberExpression", "computed": false, "object": { "range": [ 26, 29 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 29 } }, "type": "CallExpression", "callee": { "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } }, "type": "Identifier", "name": "h" }, "arguments": [] }, "property": { "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } }, "type": "Identifier", "name": "a" } }, { "range": [ 32, 37 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 37 } }, "type": "MemberExpression", "computed": false, "object": { "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } }, "type": "Literal", "value": 0, "raw": "0" }, "property": { "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } }, "type": "Identifier", "name": "k" } }, { "range": [ 38, 45 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 45 } }, "type": "RestElement", "argument": { "range": [ 41, 45 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 45 } }, "type": "MemberExpression", "computed": true, "object": { "range": [ 41, 42 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 42 } }, "type": "Identifier", "name": "i" }, "property": { "range": [ 43, 44 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 44 } }, "type": "Literal", "value": 0, "raw": "0" } } } ] }, "kind": "init", "method": false, "shorthand": false } ] } ] }, "right": { "range": [ 52, 53 ], "loc": { "start": { "line": 1, "column": 52 }, "end": { "line": 1, "column": 53 } }, "type": "Literal", "value": 0, "raw": "0" }, "body": { "range": [ 54, 55 ], "loc": { "start": { "line": 1, "column": 54 }, "end": { "line": 1, "column": 55 } }, "type": "EmptyStatement" }, "each": false } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "[", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "a", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": ",", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "b", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "[", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "a", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "]", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ",", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "c", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ",", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "d", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "=", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "e", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ",", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "[", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "f", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "]", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ":", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "[", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Identifier", "value": "g", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ",", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "h", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "(", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": ")", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": ".", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Identifier", "value": "a", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": ",", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "(", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Numeric", "value": "0", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ")", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": ".", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Identifier", "value": "k", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": ",", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": "...", "range": [ 38, 41 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 41 } } }, { "type": "Identifier", "value": "i", "range": [ 41, 42 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 42 } } }, { "type": "Punctuator", "value": "[", "range": [ 42, 43 ], "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 43 } } }, { "type": "Numeric", "value": "0", "range": [ 43, 44 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 44 } } }, { "type": "Punctuator", "value": "]", "range": [ 44, 45 ], "loc": { "start": { "line": 1, "column": 44 }, "end": { "line": 1, "column": 45 } } }, { "type": "Punctuator", "value": "]", "range": [ 45, 46 ], "loc": { "start": { "line": 1, "column": 45 }, "end": { "line": 1, "column": 46 } } }, { "type": "Punctuator", "value": "}", "range": [ 46, 47 ], "loc": { "start": { "line": 1, "column": 46 }, "end": { "line": 1, "column": 47 } } }, { "type": "Punctuator", "value": "]", "range": [ 47, 48 ], "loc": { "start": { "line": 1, "column": 47 }, "end": { "line": 1, "column": 48 } } }, { "type": "Keyword", "value": "in", "range": [ 49, 51 ], "loc": { "start": { "line": 1, "column": 49 }, "end": { "line": 1, "column": 51 } } }, { "type": "Numeric", "value": "0", "range": [ 52, 53 ], "loc": { "start": { "line": 1, "column": 52 }, "end": { "line": 1, "column": 53 } } }, { "type": "Punctuator", "value": ")", "range": [ 53, 54 ], "loc": { "start": { "line": 1, "column": 53 }, "end": { "line": 1, "column": 54 } } }, { "type": "Punctuator", "value": ";", "range": [ 54, 55 ], "loc": { "start": { "line": 1, "column": 54 }, "end": { "line": 1, "column": 55 } } } ], "range": [ 0, 55 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 55 } } } esprima-4.0.1/test/fixtures/statement/iteration/unterminated-do-while.js000066400000000000000000000000221331122015500265340ustar00rootroot00000000000000do {} while (true esprima-4.0.1/test/fixtures/statement/iteration/unterminated-do-while.tree.json000066400000000000000000000103571331122015500300430ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "DoWhileStatement", "body": { "type": "BlockStatement", "body": [], "range": [ 3, 5 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 5 } } }, "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 13, 17 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 17 } } }, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 0 } } } ], "sourceType": "script", "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 0 } }, "tokens": [ { "type": "Keyword", "value": "do", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "{", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "}", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "while", "range": [ 6, 11 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "(", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Boolean", "value": "true", "range": [ 13, 17 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 17 } } } ], "errors": [ { "index": 18, "lineNumber": 2, "column": 1, "message": "Error: Line 2: Unexpected end of input" } ] }esprima-4.0.1/test/fixtures/statement/labelled/000077500000000000000000000000001331122015500215455ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/labelled/function-declaration.js000066400000000000000000000000231331122015500262060ustar00rootroot00000000000000a: function b() {} esprima-4.0.1/test/fixtures/statement/labelled/function-declaration.tree.json000066400000000000000000000140501331122015500275060ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "LabeledStatement", "label": { "type": "Identifier", "name": "a", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "body": { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "b", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 16, 18 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 18 } } }, "generator": false, "expression": false, "async": false, "range": [ 3, 18 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 18 } } }, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } ], "sourceType": "script", "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } }, "tokens": [ { "type": "Identifier", "value": "a", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": ":", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Keyword", "value": "function", "range": [ 3, 11 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "b", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ")", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "{", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "}", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } } ] }esprima-4.0.1/test/fixtures/statement/labelled/migrated_0000.js000066400000000000000000000000331331122015500243320ustar00rootroot00000000000000start: for (;;) break startesprima-4.0.1/test/fixtures/statement/labelled/migrated_0000.tree.json000066400000000000000000000147101331122015500256340ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "LabeledStatement", "label": { "type": "Identifier", "name": "start", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "body": { "type": "ForStatement", "init": null, "test": null, "update": null, "body": { "type": "BreakStatement", "label": { "type": "Identifier", "name": "start", "range": [ 22, 27 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 27 } } }, "range": [ 16, 27 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 27 } } }, "range": [ 7, 27 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 27 } } }, "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "start", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ":", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Keyword", "value": "for", "range": [ 7, 10 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ";", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ")", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Keyword", "value": "break", "range": [ 16, 21 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 21 } } }, { "type": "Identifier", "value": "start", "range": [ 22, 27 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 27 } } } ], "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } } } esprima-4.0.1/test/fixtures/statement/labelled/migrated_0001.js000066400000000000000000000000371331122015500243370ustar00rootroot00000000000000start: while (true) break startesprima-4.0.1/test/fixtures/statement/labelled/migrated_0001.tree.json000066400000000000000000000150511331122015500256340ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "LabeledStatement", "label": { "type": "Identifier", "name": "start", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "body": { "type": "WhileStatement", "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 14, 18 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 18 } } }, "body": { "type": "BreakStatement", "label": { "type": "Identifier", "name": "start", "range": [ 26, 31 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 31 } } }, "range": [ 20, 31 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 31 } } }, "range": [ 7, 31 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 31 } } }, "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "start", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ":", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Keyword", "value": "while", "range": [ 7, 12 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "(", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Boolean", "value": "true", "range": [ 14, 18 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Keyword", "value": "break", "range": [ 20, 25 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 25 } } }, { "type": "Identifier", "value": "start", "range": [ 26, 31 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } } } esprima-4.0.1/test/fixtures/statement/labelled/migrated_0002.js000066400000000000000000000000171331122015500243360ustar00rootroot00000000000000__proto__: testesprima-4.0.1/test/fixtures/statement/labelled/migrated_0002.tree.json000066400000000000000000000066141331122015500256420ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "LabeledStatement", "label": { "type": "Identifier", "name": "__proto__", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "body": { "type": "ExpressionStatement", "expression": { "type": "Identifier", "name": "test", "range": [ 11, 15 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 15 } } }, "range": [ 11, 15 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 15 } } }, "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "__proto__", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ":", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "test", "range": [ 11, 15 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } esprima-4.0.1/test/fixtures/statement/return/000077500000000000000000000000001331122015500213205ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/return/migrated_0000.js000066400000000000000000000000261331122015500241070ustar00rootroot00000000000000(function(){ return })esprima-4.0.1/test/fixtures/statement/return/migrated_0000.tree.json000066400000000000000000000134211331122015500254050ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": null, "range": [ 13, 20 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 20 } } } ], "range": [ 11, 21 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 21 } } }, "generator": false, "expression": false, "async": false, "range": [ 1, 21 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 21 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "function", "range": [ 1, 9 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "(", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ")", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "{", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Keyword", "value": "return", "range": [ 13, 19 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "}", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ")", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ], "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } esprima-4.0.1/test/fixtures/statement/return/migrated_0001.js000066400000000000000000000000271331122015500241110ustar00rootroot00000000000000(function(){ return; })esprima-4.0.1/test/fixtures/statement/return/migrated_0001.tree.json000066400000000000000000000142531331122015500254120ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": null, "range": [ 13, 20 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 20 } } } ], "range": [ 11, 22 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 22 } } }, "generator": false, "expression": false, "async": false, "range": [ 1, 22 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "function", "range": [ 1, 9 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "(", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ")", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "{", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Keyword", "value": "return", "range": [ 13, 19 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ";", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "}", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ")", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ], "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } esprima-4.0.1/test/fixtures/statement/return/migrated_0002.js000066400000000000000000000000311331122015500241050ustar00rootroot00000000000000(function(){ return x; })esprima-4.0.1/test/fixtures/statement/return/migrated_0002.tree.json000066400000000000000000000164441331122015500254170ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "Identifier", "name": "x", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, "range": [ 13, 22 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 22 } } } ], "range": [ 11, 24 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 24 } } }, "generator": false, "expression": false, "async": false, "range": [ 1, 24 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 24 } } }, "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "function", "range": [ 1, 9 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "(", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ")", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "{", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Keyword", "value": "return", "range": [ 13, 19 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "value": "x", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ";", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "}", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": ")", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ], "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } esprima-4.0.1/test/fixtures/statement/return/migrated_0003.js000066400000000000000000000000341331122015500241110ustar00rootroot00000000000000(function(){ return x * y })esprima-4.0.1/test/fixtures/statement/return/migrated_0003.tree.json000066400000000000000000000225531331122015500254160ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "x", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, "range": [ 20, 25 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 25 } } }, "range": [ 13, 26 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 26 } } } ], "range": [ 11, 27 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 27 } } }, "generator": false, "expression": false, "async": false, "range": [ 1, 27 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 27 } } }, "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "function", "range": [ 1, 9 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "(", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ")", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "{", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Keyword", "value": "return", "range": [ 13, 19 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "value": "x", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "*", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "y", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "}", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": ")", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } } ], "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } } } esprima-4.0.1/test/fixtures/statement/return/multiline_string.js000066400000000000000000000000561331122015500252470ustar00rootroot00000000000000function a() { return 'hello \ world'; } esprima-4.0.1/test/fixtures/statement/return/multiline_string.tree.json000066400000000000000000000153411331122015500265450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "a", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "Literal", "value": "hello \tworld", "raw": "'hello \\\n \tworld'", "range": [ 24, 42 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 3, "column": 9 } } }, "range": [ 17, 43 ], "loc": { "start": { "line": 2, "column": 2 }, "end": { "line": 3, "column": 10 } } } ], "range": [ 13, 45 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 4, "column": 1 } } }, "generator": false, "expression": false, "async": false, "range": [ 0, 45 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 4, "column": 1 } } } ], "sourceType": "script", "range": [ 0, 45 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 4, "column": 1 } }, "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "a", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Keyword", "value": "return", "range": [ 17, 23 ], "loc": { "start": { "line": 2, "column": 2 }, "end": { "line": 2, "column": 8 } } }, { "type": "String", "value": "'hello \\\n \tworld'", "range": [ 24, 42 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 3, "column": 9 } } }, { "type": "Punctuator", "value": ";", "range": [ 42, 43 ], "loc": { "start": { "line": 3, "column": 9 }, "end": { "line": 3, "column": 10 } } }, { "type": "Punctuator", "value": "}", "range": [ 44, 45 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 1 } } } ] }esprima-4.0.1/test/fixtures/statement/return/multiline_template.js000066400000000000000000000000511331122015500255470ustar00rootroot00000000000000function a() { return ` test `; } esprima-4.0.1/test/fixtures/statement/return/multiline_template.tree.json000066400000000000000000000174141331122015500270550ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "a", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ReturnStatement", "argument": { "type": "TemplateLiteral", "quasis": [ { "type": "TemplateElement", "value": { "raw": "\n \ttest\n ", "cooked": "\n \ttest\n " }, "tail": true, "range": [ 24, 37 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 4, "column": 3 } } } ], "expressions": [], "range": [ 24, 37 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 4, "column": 3 } } }, "range": [ 17, 38 ], "loc": { "start": { "line": 2, "column": 2 }, "end": { "line": 4, "column": 4 } } } ], "range": [ 13, 40 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 5, "column": 1 } } }, "generator": false, "expression": false, "async": false, "range": [ 0, 40 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 5, "column": 1 } } } ], "sourceType": "script", "range": [ 0, 40 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 5, "column": 1 } }, "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "a", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Keyword", "value": "return", "range": [ 17, 23 ], "loc": { "start": { "line": 2, "column": 2 }, "end": { "line": 2, "column": 8 } } }, { "type": "Template", "value": "`\n \ttest\n `", "range": [ 24, 37 ], "loc": { "start": { "line": 2, "column": 9 }, "end": { "line": 4, "column": 3 } } }, { "type": "Punctuator", "value": ";", "range": [ 37, 38 ], "loc": { "start": { "line": 4, "column": 3 }, "end": { "line": 4, "column": 4 } } }, { "type": "Punctuator", "value": "}", "range": [ 39, 40 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 1 } } } ] }esprima-4.0.1/test/fixtures/statement/switch/000077500000000000000000000000001331122015500213025ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/switch/migrated_0000.js000066400000000000000000000000151331122015500240670ustar00rootroot00000000000000switch (x) {}esprima-4.0.1/test/fixtures/statement/switch/migrated_0000.tree.json000066400000000000000000000071211331122015500253670ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "SwitchStatement", "discriminant": { "type": "Identifier", "name": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, "cases": [], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "switch", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "(", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "x", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ")", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "{", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "}", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } } ], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } esprima-4.0.1/test/fixtures/statement/switch/migrated_0001.js000066400000000000000000000000511331122015500240700ustar00rootroot00000000000000switch (answer) { case 42: hi(); break; }esprima-4.0.1/test/fixtures/statement/switch/migrated_0001.tree.json000066400000000000000000000265671331122015500254070ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "SwitchStatement", "discriminant": { "type": "Identifier", "name": "answer", "range": [ 8, 14 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 14 } } }, "cases": [ { "type": "SwitchCase", "test": { "type": "Literal", "value": 42, "raw": "42", "range": [ 23, 25 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 25 } } }, "consequent": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hi", "range": [ 27, 29 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 29 } } }, "arguments": [], "range": [ 27, 31 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 31 } } }, "range": [ 27, 32 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 32 } } }, { "type": "BreakStatement", "label": null, "range": [ 33, 39 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 39 } } } ], "range": [ 18, 39 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 39 } } } ], "range": [ 0, 41 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 41 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "switch", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "(", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "answer", "range": [ 8, 14 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ")", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "{", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Keyword", "value": "case", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, { "type": "Numeric", "value": "42", "range": [ 23, 25 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ":", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "hi", "range": [ 27, 29 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "(", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": ")", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": ";", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Keyword", "value": "break", "range": [ 33, 38 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": ";", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, { "type": "Punctuator", "value": "}", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } } ], "range": [ 0, 41 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 41 } } } esprima-4.0.1/test/fixtures/statement/switch/migrated_0002.js000066400000000000000000000000701331122015500240720ustar00rootroot00000000000000switch (answer) { case 42: hi(); break; default: break }esprima-4.0.1/test/fixtures/statement/switch/migrated_0002.tree.json000066400000000000000000000335541331122015500254020ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "SwitchStatement", "discriminant": { "type": "Identifier", "name": "answer", "range": [ 8, 14 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 14 } } }, "cases": [ { "type": "SwitchCase", "test": { "type": "Literal", "value": 42, "raw": "42", "range": [ 23, 25 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 25 } } }, "consequent": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "hi", "range": [ 27, 29 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 29 } } }, "arguments": [], "range": [ 27, 31 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 31 } } }, "range": [ 27, 32 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 32 } } }, { "type": "BreakStatement", "label": null, "range": [ 33, 39 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 39 } } } ], "range": [ 18, 39 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 39 } } }, { "type": "SwitchCase", "test": null, "consequent": [ { "type": "BreakStatement", "label": null, "range": [ 49, 55 ], "loc": { "start": { "line": 1, "column": 49 }, "end": { "line": 1, "column": 55 } } } ], "range": [ 40, 55 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 55 } } } ], "range": [ 0, 56 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 56 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "switch", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": "(", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "answer", "range": [ 8, 14 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ")", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "{", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Keyword", "value": "case", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, { "type": "Numeric", "value": "42", "range": [ 23, 25 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ":", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "hi", "range": [ 27, 29 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "(", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": ")", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": ";", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Keyword", "value": "break", "range": [ 33, 38 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": ";", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, { "type": "Keyword", "value": "default", "range": [ 40, 47 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 47 } } }, { "type": "Punctuator", "value": ":", "range": [ 47, 48 ], "loc": { "start": { "line": 1, "column": 47 }, "end": { "line": 1, "column": 48 } } }, { "type": "Keyword", "value": "break", "range": [ 49, 54 ], "loc": { "start": { "line": 1, "column": 49 }, "end": { "line": 1, "column": 54 } } }, { "type": "Punctuator", "value": "}", "range": [ 55, 56 ], "loc": { "start": { "line": 1, "column": 55 }, "end": { "line": 1, "column": 56 } } } ], "range": [ 0, 56 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 56 } } } esprima-4.0.1/test/fixtures/statement/throw/000077500000000000000000000000001331122015500211445ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/throw/migrated_0000.js000066400000000000000000000000101331122015500237240ustar00rootroot00000000000000throw x;esprima-4.0.1/test/fixtures/statement/throw/migrated_0000.tree.json000066400000000000000000000045421331122015500252350ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ThrowStatement", "argument": { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "throw", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ";", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } } ], "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } esprima-4.0.1/test/fixtures/statement/throw/migrated_0001.js000066400000000000000000000000131331122015500237300ustar00rootroot00000000000000throw x * yesprima-4.0.1/test/fixtures/statement/throw/migrated_0001.tree.json000066400000000000000000000075531331122015500252430ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ThrowStatement", "argument": { "type": "BinaryExpression", "operator": "*", "left": { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "range": [ 6, 11 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 11 } } }, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "throw", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "*", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 11 } } } esprima-4.0.1/test/fixtures/statement/throw/migrated_0002.js000066400000000000000000000000321331122015500237320ustar00rootroot00000000000000throw { message: "Error" }esprima-4.0.1/test/fixtures/statement/throw/migrated_0002.tree.json000066400000000000000000000134051331122015500252350ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ThrowStatement", "argument": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "message", "range": [ 8, 15 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 15 } } }, "computed": false, "value": { "type": "Literal", "value": "Error", "raw": "\"Error\"", "range": [ 17, 24 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 24 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 8, 24 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 6, 26 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 26 } } }, "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "throw", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "{", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Identifier", "value": "message", "range": [ 8, 15 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ":", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "String", "value": "\"Error\"", "range": [ 17, 24 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "}", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } } ], "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } esprima-4.0.1/test/fixtures/statement/try/000077500000000000000000000000001331122015500206175ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/try/migrated_0000.js000066400000000000000000000000251331122015500234050ustar00rootroot00000000000000try { } catch (e) { }esprima-4.0.1/test/fixtures/statement/try/migrated_0000.tree.json000066400000000000000000000145201331122015500247050ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "TryStatement", "block": { "type": "BlockStatement", "body": [], "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, "handler": { "type": "CatchClause", "param": { "type": "Identifier", "name": "e", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, "body": { "type": "BlockStatement", "body": [], "range": [ 18, 21 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 21 } } }, "range": [ 8, 21 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 21 } } }, "finalizer": null, "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "try", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "}", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Keyword", "value": "catch", "range": [ 8, 13 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "e", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "}", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } esprima-4.0.1/test/fixtures/statement/try/migrated_0001.js000066400000000000000000000000301331122015500234020ustar00rootroot00000000000000try { } catch (eval) { }esprima-4.0.1/test/fixtures/statement/try/migrated_0001.tree.json000066400000000000000000000145261331122015500247140ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "TryStatement", "block": { "type": "BlockStatement", "body": [], "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, "handler": { "type": "CatchClause", "param": { "type": "Identifier", "name": "eval", "range": [ 15, 19 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 19 } } }, "body": { "type": "BlockStatement", "body": [], "range": [ 21, 24 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 24 } } }, "range": [ 8, 24 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 24 } } }, "finalizer": null, "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "try", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "}", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Keyword", "value": "catch", "range": [ 8, 13 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "eval", "range": [ 15, 19 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ")", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "{", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "}", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 0, 24 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 24 } } } esprima-4.0.1/test/fixtures/statement/try/migrated_0002.js000066400000000000000000000000351331122015500234100ustar00rootroot00000000000000try { } catch (arguments) { }esprima-4.0.1/test/fixtures/statement/try/migrated_0002.tree.json000066400000000000000000000145401331122015500247110ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "TryStatement", "block": { "type": "BlockStatement", "body": [], "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, "handler": { "type": "CatchClause", "param": { "type": "Identifier", "name": "arguments", "range": [ 15, 24 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 24 } } }, "body": { "type": "BlockStatement", "body": [], "range": [ 26, 29 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 29 } } }, "range": [ 8, 29 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 29 } } }, "finalizer": null, "range": [ 0, 29 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 29 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "try", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "}", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Keyword", "value": "catch", "range": [ 8, 13 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "arguments", "range": [ 15, 24 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": ")", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "{", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "}", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } } ], "range": [ 0, 29 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 29 } } } esprima-4.0.1/test/fixtures/statement/try/migrated_0003.js000066400000000000000000000000341331122015500234100ustar00rootroot00000000000000try { } catch (e) { say(e) }esprima-4.0.1/test/fixtures/statement/try/migrated_0003.tree.json000066400000000000000000000262041331122015500247120ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "TryStatement", "block": { "type": "BlockStatement", "body": [], "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, "handler": { "type": "CatchClause", "param": { "type": "Identifier", "name": "e", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "say", "range": [ 20, 23 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 23 } } }, "arguments": [ { "type": "Identifier", "name": "e", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ], "range": [ 20, 26 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 26 } } }, "range": [ 20, 27 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 27 } } } ], "range": [ 18, 28 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 28 } } }, "range": [ 8, 28 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 28 } } }, "finalizer": null, "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "try", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "}", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Keyword", "value": "catch", "range": [ 8, 13 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "e", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": ")", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "value": "say", "range": [ 20, 23 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "(", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Identifier", "value": "e", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ")", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "}", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } } ], "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } } } esprima-4.0.1/test/fixtures/statement/try/migrated_0004.js000066400000000000000000000000421331122015500234100ustar00rootroot00000000000000try { } finally { cleanup(stuff) }esprima-4.0.1/test/fixtures/statement/try/migrated_0004.tree.json000066400000000000000000000211371331122015500247130ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "TryStatement", "block": { "type": "BlockStatement", "body": [], "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, "handler": null, "finalizer": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cleanup", "range": [ 18, 25 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 25 } } }, "arguments": [ { "type": "Identifier", "name": "stuff", "range": [ 26, 31 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 31 } } } ], "range": [ 18, 32 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 32 } } }, "range": [ 18, 33 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 33 } } } ], "range": [ 16, 34 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 34 } } }, "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "try", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "}", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Keyword", "value": "finally", "range": [ 8, 15 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "{", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "cleanup", "range": [ 18, 25 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "(", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "stuff", "range": [ 26, 31 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": ")", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } } ], "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } esprima-4.0.1/test/fixtures/statement/try/migrated_0005.js000066400000000000000000000000461331122015500234150ustar00rootroot00000000000000try { doThat(); } catch (e) { say(e) }esprima-4.0.1/test/fixtures/statement/try/migrated_0005.tree.json000066400000000000000000000354671331122015500247270ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "TryStatement", "block": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "doThat", "range": [ 6, 12 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 12 } } }, "arguments": [], "range": [ 6, 14 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 14 } } }, "range": [ 6, 15 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 4, 17 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 17 } } }, "handler": { "type": "CatchClause", "param": { "type": "Identifier", "name": "e", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "say", "range": [ 30, 33 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 33 } } }, "arguments": [ { "type": "Identifier", "name": "e", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } } ], "range": [ 30, 36 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 36 } } }, "range": [ 30, 37 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 37 } } } ], "range": [ 28, 38 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 38 } } }, "range": [ 18, 38 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 38 } } }, "finalizer": null, "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "try", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "doThat", "range": [ 6, 12 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "(", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ";", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "}", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Keyword", "value": "catch", "range": [ 18, 23 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "(", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Identifier", "value": "e", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": ")", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "{", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Identifier", "value": "say", "range": [ 30, 33 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "(", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Identifier", "value": "e", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": ")", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": "}", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } } ], "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } esprima-4.0.1/test/fixtures/statement/try/migrated_0006.js000066400000000000000000000001011331122015500234060ustar00rootroot00000000000000try { doThat(); } catch (e) { say(e) } finally { cleanup(stuff) }esprima-4.0.1/test/fixtures/statement/try/migrated_0006.tree.json000066400000000000000000000517721331122015500247250ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "TryStatement", "block": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "doThat", "range": [ 6, 12 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 12 } } }, "arguments": [], "range": [ 6, 14 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 14 } } }, "range": [ 6, 15 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 15 } } } ], "range": [ 4, 17 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 17 } } }, "handler": { "type": "CatchClause", "param": { "type": "Identifier", "name": "e", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "say", "range": [ 30, 33 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 33 } } }, "arguments": [ { "type": "Identifier", "name": "e", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } } ], "range": [ 30, 36 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 36 } } }, "range": [ 30, 37 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 37 } } } ], "range": [ 28, 38 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 38 } } }, "range": [ 18, 38 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 38 } } }, "finalizer": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "cleanup", "range": [ 49, 56 ], "loc": { "start": { "line": 1, "column": 49 }, "end": { "line": 1, "column": 56 } } }, "arguments": [ { "type": "Identifier", "name": "stuff", "range": [ 57, 62 ], "loc": { "start": { "line": 1, "column": 57 }, "end": { "line": 1, "column": 62 } } } ], "range": [ 49, 63 ], "loc": { "start": { "line": 1, "column": 49 }, "end": { "line": 1, "column": 63 } } }, "range": [ 49, 64 ], "loc": { "start": { "line": 1, "column": 49 }, "end": { "line": 1, "column": 64 } } } ], "range": [ 47, 65 ], "loc": { "start": { "line": 1, "column": 47 }, "end": { "line": 1, "column": 65 } } }, "range": [ 0, 65 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 65 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "try", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "doThat", "range": [ 6, 12 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "(", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ";", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "}", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Keyword", "value": "catch", "range": [ 18, 23 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "(", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Identifier", "value": "e", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": ")", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "{", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Identifier", "value": "say", "range": [ 30, 33 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "(", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Identifier", "value": "e", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": ")", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": "}", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Keyword", "value": "finally", "range": [ 39, 46 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 46 } } }, { "type": "Punctuator", "value": "{", "range": [ 47, 48 ], "loc": { "start": { "line": 1, "column": 47 }, "end": { "line": 1, "column": 48 } } }, { "type": "Identifier", "value": "cleanup", "range": [ 49, 56 ], "loc": { "start": { "line": 1, "column": 49 }, "end": { "line": 1, "column": 56 } } }, { "type": "Punctuator", "value": "(", "range": [ 56, 57 ], "loc": { "start": { "line": 1, "column": 56 }, "end": { "line": 1, "column": 57 } } }, { "type": "Identifier", "value": "stuff", "range": [ 57, 62 ], "loc": { "start": { "line": 1, "column": 57 }, "end": { "line": 1, "column": 62 } } }, { "type": "Punctuator", "value": ")", "range": [ 62, 63 ], "loc": { "start": { "line": 1, "column": 62 }, "end": { "line": 1, "column": 63 } } }, { "type": "Punctuator", "value": "}", "range": [ 64, 65 ], "loc": { "start": { "line": 1, "column": 64 }, "end": { "line": 1, "column": 65 } } } ], "range": [ 0, 65 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 65 } } } esprima-4.0.1/test/fixtures/statement/try/strict_simple_catch.js000066400000000000000000000000451331122015500251770ustar00rootroot00000000000000"use strict"; try {} catch (evil) {} esprima-4.0.1/test/fixtures/statement/try/strict_simple_catch.tree.json000066400000000000000000000201471331122015500264770ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "TryStatement", "block": { "type": "BlockStatement", "body": [], "range": [ 18, 20 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 6 } } }, "handler": { "type": "CatchClause", "param": { "type": "Identifier", "name": "evil", "range": [ 28, 32 ], "loc": { "start": { "line": 2, "column": 14 }, "end": { "line": 2, "column": 18 } } }, "body": { "type": "BlockStatement", "body": [], "range": [ 34, 36 ], "loc": { "start": { "line": 2, "column": 20 }, "end": { "line": 2, "column": 22 } } }, "range": [ 21, 36 ], "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 22 } } }, "finalizer": null, "range": [ 14, 36 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 22 } } } ], "sourceType": "script", "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 22 } }, "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "try", "range": [ 14, 17 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 2, "column": 4 }, "end": { "line": 2, "column": 5 } } }, { "type": "Punctuator", "value": "}", "range": [ 19, 20 ], "loc": { "start": { "line": 2, "column": 5 }, "end": { "line": 2, "column": 6 } } }, { "type": "Keyword", "value": "catch", "range": [ 21, 26 ], "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 12 } } }, { "type": "Punctuator", "value": "(", "range": [ 27, 28 ], "loc": { "start": { "line": 2, "column": 13 }, "end": { "line": 2, "column": 14 } } }, { "type": "Identifier", "value": "evil", "range": [ 28, 32 ], "loc": { "start": { "line": 2, "column": 14 }, "end": { "line": 2, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 32, 33 ], "loc": { "start": { "line": 2, "column": 18 }, "end": { "line": 2, "column": 19 } } }, { "type": "Punctuator", "value": "{", "range": [ 34, 35 ], "loc": { "start": { "line": 2, "column": 20 }, "end": { "line": 2, "column": 21 } } }, { "type": "Punctuator", "value": "}", "range": [ 35, 36 ], "loc": { "start": { "line": 2, "column": 21 }, "end": { "line": 2, "column": 22 } } } ] } esprima-4.0.1/test/fixtures/statement/variable/000077500000000000000000000000001331122015500215665ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/variable/complex-pattern-requires-init.failure.json000066400000000000000000000002001331122015500320170ustar00rootroot00000000000000{"index":7,"lineNumber":2,"column":1,"message":"Error: Line 2: Unexpected end of input","description":"Unexpected end of input"}esprima-4.0.1/test/fixtures/statement/variable/complex-pattern-requires-init.js000066400000000000000000000000071331122015500300410ustar00rootroot00000000000000var [] esprima-4.0.1/test/fixtures/statement/variable/invalid_trailing_comma_1.failure.json000066400000000000000000000002001331122015500310120ustar00rootroot00000000000000{"index":7,"lineNumber":2,"column":1,"message":"Error: Line 2: Unexpected end of input","description":"Unexpected end of input"}esprima-4.0.1/test/fixtures/statement/variable/invalid_trailing_comma_1.js000066400000000000000000000000071331122015500270340ustar00rootroot00000000000000var x, esprima-4.0.1/test/fixtures/statement/variable/invalid_trailing_comma_2.failure.json000066400000000000000000000001661331122015500310260ustar00rootroot00000000000000{"index":6,"lineNumber":1,"column":7,"message":"Error: Line 1: Unexpected token ;","description":"Unexpected token ;"}esprima-4.0.1/test/fixtures/statement/variable/invalid_trailing_comma_2.js000066400000000000000000000000101331122015500270270ustar00rootroot00000000000000var x,; esprima-4.0.1/test/fixtures/statement/variable/invalid_trailing_comma_3.failure.json000066400000000000000000000001661331122015500310270ustar00rootroot00000000000000{"index":7,"lineNumber":1,"column":8,"message":"Error: Line 1: Unexpected token ;","description":"Unexpected token ;"}esprima-4.0.1/test/fixtures/statement/variable/invalid_trailing_comma_3.js000066400000000000000000000000111331122015500270310ustar00rootroot00000000000000var x, ; esprima-4.0.1/test/fixtures/statement/variable/invalid_trailing_comma_4.failure.json000066400000000000000000000002011331122015500310160ustar00rootroot00000000000000{"index":10,"lineNumber":2,"column":1,"message":"Error: Line 2: Unexpected end of input","description":"Unexpected end of input"}esprima-4.0.1/test/fixtures/statement/variable/invalid_trailing_comma_4.js000066400000000000000000000000121331122015500270330ustar00rootroot00000000000000var x, y, esprima-4.0.1/test/fixtures/statement/variable/invalid_trailing_comma_5.failure.json000066400000000000000000000001671331122015500310320ustar00rootroot00000000000000{"index":11,"lineNumber":2,"column":5,"message":"Error: Line 2: Unexpected token ;","description":"Unexpected token ;"}esprima-4.0.1/test/fixtures/statement/variable/invalid_trailing_comma_5.js000066400000000000000000000000151331122015500270370ustar00rootroot00000000000000var x, y,; esprima-4.0.1/test/fixtures/statement/variable/invalid_trailing_comma_6.failure.json000066400000000000000000000002011331122015500310200ustar00rootroot00000000000000{"index":17,"lineNumber":2,"column":1,"message":"Error: Line 2: Unexpected end of input","description":"Unexpected end of input"}esprima-4.0.1/test/fixtures/statement/variable/invalid_trailing_comma_6.js000066400000000000000000000000211331122015500270350ustar00rootroot00000000000000var answer = 42, esprima-4.0.1/test/fixtures/statement/variable/migrated_0000.js000066400000000000000000000000051331122015500243520ustar00rootroot00000000000000var xesprima-4.0.1/test/fixtures/statement/variable/migrated_0000.tree.json000066400000000000000000000053161331122015500256570ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": null, "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "kind": "var", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/statement/variable/migrated_0001.js000066400000000000000000000000111331122015500243500ustar00rootroot00000000000000var x, y;esprima-4.0.1/test/fixtures/statement/variable/migrated_0001.tree.json000066400000000000000000000120611331122015500256530ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": null, "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "y", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, "init": null, "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } } ], "kind": "var", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": ",", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "y", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ";", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/statement/variable/migrated_0002.js000066400000000000000000000000121331122015500243520ustar00rootroot00000000000000var x = 42esprima-4.0.1/test/fixtures/statement/variable/migrated_0002.tree.json000066400000000000000000000101671331122015500256610ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": 42, "raw": "42", "range": [ 8, 10 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 10 } } }, "range": [ 4, 10 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 10 } } } ], "kind": "var", "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Numeric", "value": "42", "range": [ 8, 10 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 10 } } } ], "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } } esprima-4.0.1/test/fixtures/statement/variable/migrated_0003.js000066400000000000000000000000351331122015500243600ustar00rootroot00000000000000var eval = 42, arguments = 42esprima-4.0.1/test/fixtures/statement/variable/migrated_0003.tree.json000066400000000000000000000170331331122015500256610ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "eval", "range": [ 4, 8 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 8 } } }, "init": { "type": "Literal", "value": 42, "raw": "42", "range": [ 11, 13 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 13 } } }, "range": [ 4, 13 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 13 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "arguments", "range": [ 15, 24 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 24 } } }, "init": { "type": "Literal", "value": 42, "raw": "42", "range": [ 27, 29 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 29 } } }, "range": [ 15, 29 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 29 } } } ], "kind": "var", "range": [ 0, 29 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 29 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "eval", "range": [ 4, 8 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "=", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Numeric", "value": "42", "range": [ 11, 13 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ",", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "arguments", "range": [ 15, 24 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "=", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Numeric", "value": "42", "range": [ 27, 29 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 29 } } } ], "range": [ 0, 29 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 29 } } } esprima-4.0.1/test/fixtures/statement/variable/migrated_0004.js000066400000000000000000000000331331122015500243570ustar00rootroot00000000000000var x = 14, y = 3, z = 1977esprima-4.0.1/test/fixtures/statement/variable/migrated_0004.tree.json000066400000000000000000000256121331122015500256640ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": 14, "raw": "14", "range": [ 8, 10 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 10 } } }, "range": [ 4, 10 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 10 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "y", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, "init": { "type": "Literal", "value": 3, "raw": "3", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "range": [ 12, 17 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 17 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "z", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, "init": { "type": "Literal", "value": 1977, "raw": "1977", "range": [ 23, 27 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 27 } } }, "range": [ 19, 27 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 27 } } } ], "kind": "var", "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Numeric", "value": "14", "range": [ 8, 10 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ",", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Identifier", "value": "y", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "=", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Numeric", "value": "3", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": ",", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Identifier", "value": "z", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "=", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Numeric", "value": "1977", "range": [ 23, 27 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 27 } } } ], "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 27 } } } esprima-4.0.1/test/fixtures/statement/variable/migrated_0005.js000066400000000000000000000000421331122015500243600ustar00rootroot00000000000000var implements, interface, packageesprima-4.0.1/test/fixtures/statement/variable/migrated_0005.tree.json000066400000000000000000000153001331122015500256560ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "implements", "range": [ 4, 14 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 14 } } }, "init": null, "range": [ 4, 14 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 14 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "interface", "range": [ 16, 25 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 25 } } }, "init": null, "range": [ 16, 25 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 25 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "package", "range": [ 27, 34 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 34 } } }, "init": null, "range": [ 27, 34 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 34 } } } ], "kind": "var", "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "implements", "range": [ 4, 14 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ",", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "interface", "range": [ 16, 25 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ",", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "package", "range": [ 27, 34 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 34 } } } ], "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } esprima-4.0.1/test/fixtures/statement/variable/migrated_0006.js000066400000000000000000000000461331122015500243650ustar00rootroot00000000000000var private, protected, public, staticesprima-4.0.1/test/fixtures/statement/variable/migrated_0006.tree.json000066400000000000000000000212371331122015500256650ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "private", "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, "init": null, "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "protected", "range": [ 13, 22 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 22 } } }, "init": null, "range": [ 13, 22 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 22 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "public", "range": [ 24, 30 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 30 } } }, "init": null, "range": [ 24, 30 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 30 } } }, { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "static", "range": [ 32, 38 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 38 } } }, "init": null, "range": [ 32, 38 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 38 } } } ], "kind": "var", "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "private", "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ",", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "protected", "range": [ 13, 22 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ",", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "public", "range": [ 24, 30 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": ",", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Identifier", "value": "static", "range": [ 32, 38 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 38 } } } ], "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } esprima-4.0.1/test/fixtures/statement/variable/var_let.js000066400000000000000000000000111331122015500235500ustar00rootroot00000000000000var let; esprima-4.0.1/test/fixtures/statement/variable/var_let.tree.json000066400000000000000000000061451331122015500250610ustar00rootroot00000000000000{ "type": "Program", "body": [ { "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } }, "type": "VariableDeclaration", "declarations": [ { "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } }, "type": "VariableDeclarator", "id": { "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } }, "type": "Identifier", "name": "let" }, "init": null } ], "kind": "var" } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Keyword", "value": "let", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ";", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } } ], "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } } esprima-4.0.1/test/fixtures/statement/with/000077500000000000000000000000001331122015500207545ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/statement/with/migrated_0000.js000066400000000000000000000000221331122015500235370ustar00rootroot00000000000000with (x) foo = baresprima-4.0.1/test/fixtures/statement/with/migrated_0000.tree.json000066400000000000000000000143231331122015500250430ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "WithStatement", "object": { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "body": { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "foo", "range": [ 9, 12 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } } }, "right": { "type": "Identifier", "name": "bar", "range": [ 15, 18 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 18 } } }, "range": [ 9, 18 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } } }, "range": [ 9, 18 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } } }, "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "with", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "(", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ")", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "foo", "range": [ 9, 12 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "=", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "bar", "range": [ 15, 18 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 18 } } } ], "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } esprima-4.0.1/test/fixtures/statement/with/migrated_0001.js000066400000000000000000000000231331122015500235410ustar00rootroot00000000000000with (x) foo = bar;esprima-4.0.1/test/fixtures/statement/with/migrated_0001.tree.json000066400000000000000000000151551331122015500250500ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "WithStatement", "object": { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "body": { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "foo", "range": [ 9, 12 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } } }, "right": { "type": "Identifier", "name": "bar", "range": [ 15, 18 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 18 } } }, "range": [ 9, 18 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 18 } } }, "range": [ 9, 19 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 19 } } }, "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "with", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "(", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ")", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "foo", "range": [ 9, 12 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "=", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Identifier", "value": "bar", "range": [ 15, 18 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ";", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } } ], "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } } esprima-4.0.1/test/fixtures/statement/with/migrated_0002.js000066400000000000000000000000261331122015500235450ustar00rootroot00000000000000with (x) { foo = bar }esprima-4.0.1/test/fixtures/statement/with/migrated_0002.tree.json000066400000000000000000000200671331122015500250470ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "WithStatement", "object": { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "foo", "range": [ 11, 14 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 14 } } }, "right": { "type": "Identifier", "name": "bar", "range": [ 17, 20 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 20 } } }, "range": [ 11, 20 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 20 } } }, "range": [ 11, 21 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 21 } } } ], "range": [ 9, 22 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 22 } } }, "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "with", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "(", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ")", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "{", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Identifier", "value": "foo", "range": [ 11, 14 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "=", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "bar", "range": [ 17, 20 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": "}", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ], "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } esprima-4.0.1/test/fixtures/statement/with/unterminated-with.js000066400000000000000000000000101331122015500247510ustar00rootroot00000000000000with (x esprima-4.0.1/test/fixtures/statement/with/unterminated-with.tree.json000066400000000000000000000057421331122015500262650ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "WithStatement", "object": { "type": "Identifier", "name": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "body": { "type": "EmptyStatement", "range": [ 8, 8 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 0 } } }, "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 0 } } } ], "sourceType": "script", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 0 } }, "tokens": [ { "type": "Keyword", "value": "with", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "(", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "x", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "errors": [ { "index": 8, "lineNumber": 2, "column": 1, "message": "Error: Line 2: Unexpected end of input" } ] }esprima-4.0.1/test/fixtures/tokenize/000077500000000000000000000000001331122015500176255ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/tokenize/empty.js000066400000000000000000000000001331122015500213070ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/tokenize/empty.tokens.json000066400000000000000000000000031331122015500231510ustar00rootroot00000000000000[] esprima-4.0.1/test/fixtures/tokenize/leading_comment.js000066400000000000000000000000301331122015500233010ustar00rootroot00000000000000/* hello world */ /42/ esprima-4.0.1/test/fixtures/tokenize/leading_comment.tokens.json000066400000000000000000000014201331122015500251440ustar00rootroot00000000000000[ { "type": "BlockComment", "value": " hello world ", "range": [ 0, 17 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 17 } } }, { "type": "RegularExpression", "value": "/42/", "range": [ 19, 23 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 23 } }, "regex": { "pattern": "42", "flags": "" } } ] esprima-4.0.1/test/fixtures/tokenize/line_comment.js000066400000000000000000000000411331122015500226270ustar00rootroot00000000000000var answer = 42 // the Ultimate esprima-4.0.1/test/fixtures/tokenize/line_comment.tokens.json000066400000000000000000000032461331122015500245000ustar00rootroot00000000000000[ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "answer", "range": [ 4, 10 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "=", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Numeric", "value": "42", "range": [ 13, 15 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 15 } } }, { "type": "LineComment", "value": " the Ultimate", "range": [ 17, 32 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 32 } } } ] esprima-4.0.1/test/fixtures/tokenize/line_terminators.js000066400000000000000000000000041331122015500235330ustar00rootroot00000000000000 esprima-4.0.1/test/fixtures/tokenize/line_terminators.tokens.json000066400000000000000000000000031331122015500253710ustar00rootroot00000000000000[] esprima-4.0.1/test/fixtures/tokenize/migrated_0000.js000066400000000000000000000000161331122015500224130ustar00rootroot00000000000000tokenize(/42/)esprima-4.0.1/test/fixtures/tokenize/migrated_0000.tokens.json000066400000000000000000000026451331122015500242640ustar00rootroot00000000000000[ { "type": "Identifier", "value": "tokenize", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "(", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "RegularExpression", "value": "/42/", "range": [ 9, 13 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 13 } }, "regex": { "pattern": "42", "flags": "" } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } } ] esprima-4.0.1/test/fixtures/tokenize/migrated_0001.js000066400000000000000000000000231331122015500224120ustar00rootroot00000000000000if (false) { /42/ }esprima-4.0.1/test/fixtures/tokenize/migrated_0001.tokens.json000066400000000000000000000046171331122015500242660ustar00rootroot00000000000000[ { "type": "Keyword", "value": "if", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Boolean", "value": "false", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ")", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "{", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "RegularExpression", "value": "/42/", "range": [ 13, 17 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 17 } }, "regex": { "pattern": "42", "flags": "" } }, { "type": "Punctuator", "value": "}", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } } ] esprima-4.0.1/test/fixtures/tokenize/migrated_0002.js000066400000000000000000000000211331122015500224110ustar00rootroot00000000000000with (false) /42/esprima-4.0.1/test/fixtures/tokenize/migrated_0002.tokens.json000066400000000000000000000033611331122015500242620ustar00rootroot00000000000000[ { "type": "Keyword", "value": "with", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "(", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Boolean", "value": "false", "range": [ 6, 11 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "RegularExpression", "value": "/42/", "range": [ 13, 17 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 17 } }, "regex": { "pattern": "42", "flags": "" } } ] esprima-4.0.1/test/fixtures/tokenize/migrated_0003.js000066400000000000000000000000141331122015500224140ustar00rootroot00000000000000(false) /42/esprima-4.0.1/test/fixtures/tokenize/migrated_0003.tokens.json000066400000000000000000000037331331122015500242660ustar00rootroot00000000000000[ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Boolean", "value": "false", "range": [ 1, 6 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 6 } } }, { "type": "Punctuator", "value": ")", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "/", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Numeric", "value": "42", "range": [ 9, 11 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "/", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } } ]esprima-4.0.1/test/fixtures/tokenize/migrated_0004.js000066400000000000000000000000231331122015500224150ustar00rootroot00000000000000function f(){} /42/esprima-4.0.1/test/fixtures/tokenize/migrated_0004.tokens.json000066400000000000000000000046341331122015500242700ustar00rootroot00000000000000[ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "f", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "}", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "RegularExpression", "value": "/42/", "range": [ 15, 19 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 19 } }, "regex": { "pattern": "42", "flags": "" } } ] esprima-4.0.1/test/fixtures/tokenize/migrated_0005.js000066400000000000000000000000201331122015500224130ustar00rootroot00000000000000function(){} /42esprima-4.0.1/test/fixtures/tokenize/migrated_0005.tokens.json000066400000000000000000000044701331122015500242670ustar00rootroot00000000000000[ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": "(", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ")", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "{", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "}", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "/", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Numeric", "value": "42", "range": [ 14, 16 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 16 } } } ]esprima-4.0.1/test/fixtures/tokenize/migrated_0006.js000066400000000000000000000000061331122015500224200ustar00rootroot00000000000000{} /42esprima-4.0.1/test/fixtures/tokenize/migrated_0006.tokens.json000066400000000000000000000024701331122015500242660ustar00rootroot00000000000000[ { "type": "Punctuator", "value": "{", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "}", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "/", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Numeric", "value": "42", "range": [ 4, 6 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 6 } } } ]esprima-4.0.1/test/fixtures/tokenize/migrated_0007.js000066400000000000000000000000221331122015500224170ustar00rootroot00000000000000[function(){} /42]esprima-4.0.1/test/fixtures/tokenize/migrated_0007.tokens.json000066400000000000000000000057341331122015500242750ustar00rootroot00000000000000[ { "type": "Punctuator", "value": "[", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "function", "range": [ 1, 9 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "(", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ")", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "{", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "}", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "/", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Numeric", "value": "42", "range": [ 15, 17 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "]", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } } ]esprima-4.0.1/test/fixtures/tokenize/migrated_0008.js000066400000000000000000000000241331122015500224220ustar00rootroot00000000000000;function f(){} /42/esprima-4.0.1/test/fixtures/tokenize/migrated_0008.tokens.json000066400000000000000000000053541331122015500242740ustar00rootroot00000000000000[ { "type": "Punctuator", "value": ";", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "function", "range": [ 1, 9 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "f", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "(", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ")", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "}", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "RegularExpression", "value": "/42/", "range": [ 16, 20 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 20 } }, "regex": { "pattern": "42", "flags": "" } } ] esprima-4.0.1/test/fixtures/tokenize/migrated_0009.js000066400000000000000000000000111331122015500224170ustar00rootroot00000000000000void /42/esprima-4.0.1/test/fixtures/tokenize/migrated_0009.tokens.json000066400000000000000000000013741331122015500242730ustar00rootroot00000000000000[ { "type": "Keyword", "value": "void", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "RegularExpression", "value": "/42/", "range": [ 5, 9 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 9 } }, "regex": { "pattern": "42", "flags": "" } } ] esprima-4.0.1/test/fixtures/tokenize/migrated_0010.js000066400000000000000000000000041331122015500224110ustar00rootroot00000000000000/42/esprima-4.0.1/test/fixtures/tokenize/migrated_0010.tokens.json000066400000000000000000000006561331122015500242650ustar00rootroot00000000000000[ { "type": "RegularExpression", "value": "/42/", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } }, "regex": { "pattern": "42", "flags": "" } } ] esprima-4.0.1/test/fixtures/tokenize/migrated_0011.js000066400000000000000000000000101331122015500224070ustar00rootroot00000000000000foo[/42]esprima-4.0.1/test/fixtures/tokenize/migrated_0011.tokens.json000066400000000000000000000012401331122015500242540ustar00rootroot00000000000000[ { "type": "Identifier", "value": "foo", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "[", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } } ]esprima-4.0.1/test/fixtures/tokenize/migrated_0012.js000066400000000000000000000000071331122015500224160ustar00rootroot00000000000000[a] / besprima-4.0.1/test/fixtures/tokenize/migrated_0012.tokens.json000066400000000000000000000032101331122015500242540ustar00rootroot00000000000000[ { "type": "Punctuator", "value": "[", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Identifier", "value": "a", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "]", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "/", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "b", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ]esprima-4.0.1/test/fixtures/tokenize/migrated_0013.js000066400000000000000000000000001331122015500224100ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/tokenize/migrated_0013.tokens.json000066400000000000000000000000021331122015500242510ustar00rootroot00000000000000[]esprima-4.0.1/test/fixtures/tokenize/migrated_0014.failure.json000066400000000000000000000002251331122015500244050ustar00rootroot00000000000000{ "tokenize": true, "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Invalid regular expression: missing /" }esprima-4.0.1/test/fixtures/tokenize/migrated_0014.js000066400000000000000000000000031331122015500224140ustar00rootroot00000000000000/42esprima-4.0.1/test/fixtures/tokenize/migrated_0015.failure.json000066400000000000000000000002251331122015500244060ustar00rootroot00000000000000{ "tokenize": true, "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Invalid regular expression: missing /" }esprima-4.0.1/test/fixtures/tokenize/migrated_0015.js000066400000000000000000000000071331122015500224210ustar00rootroot00000000000000foo[/42esprima-4.0.1/test/fixtures/tokenize/migrated_0016.js000066400000000000000000000000131331122015500224170ustar00rootroot00000000000000this / 100;esprima-4.0.1/test/fixtures/tokenize/migrated_0016.tokens.json000066400000000000000000000024771331122015500242760ustar00rootroot00000000000000[ { "type": "Keyword", "value": "this", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": "/", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Numeric", "value": "100", "range": [ 7, 10 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ";", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ]esprima-4.0.1/test/fixtures/tokenize/trailing_comment.js000066400000000000000000000000221331122015500235100ustar00rootroot00000000000000/42/ /* answer */ esprima-4.0.1/test/fixtures/tokenize/trailing_comment.tokens.json000066400000000000000000000014071331122015500253570ustar00rootroot00000000000000[ { "type": "RegularExpression", "value": "/42/", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } }, "regex": { "pattern": "42", "flags": "" } }, { "type": "BlockComment", "value": " answer ", "range": [ 5, 17 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 17 } } } ] esprima-4.0.1/test/fixtures/tolerant-parse/000077500000000000000000000000001331122015500207355ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/tolerant-parse/for-in-missing-parenthesis.js000066400000000000000000000000171331122015500264550ustar00rootroot00000000000000for (x in y esprima-4.0.1/test/fixtures/tolerant-parse/for-in-missing-parenthesis.tree.json000066400000000000000000000104311331122015500277510ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForInStatement", "left": { "type": "Identifier", "name": "x", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "body": { "range": [ 15, 15 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 0 } }, "type": "EmptyStatement" }, "each": false, "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 3, "column": 0 } } } ], "sourceType": "script", "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 3, "column": 0 } }, "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "x", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Keyword", "value": "in", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "errors": [ { "index": 15, "lineNumber": 3, "column": 1, "message": "Error: Line 3: Unexpected end of input" } ] } esprima-4.0.1/test/fixtures/tolerant-parse/for-missing-parenthesis.js000066400000000000000000000000331331122015500260470ustar00rootroot00000000000000for (var i = 0; i < j; ++i esprima-4.0.1/test/fixtures/tolerant-parse/for-missing-parenthesis.tree.json000066400000000000000000000272711331122015500273570ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForStatement", "init": { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "i", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "init": { "type": "Literal", "value": 0, "raw": "0", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } } ], "kind": "var", "range": [ 5, 14 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 14 } } }, "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "i", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, "right": { "type": "Identifier", "name": "j", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, "range": [ 16, 21 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 21 } } }, "update": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "i", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, "prefix": true, "range": [ 23, 26 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 26 } } }, "body": { "range": [ 27, 27 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 0 } }, "type": "EmptyStatement" }, "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 0 } } } ], "sourceType": "script", "range": [ 0, 27 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 0 } }, "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Keyword", "value": "var", "range": [ 5, 8 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "i", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "=", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Numeric", "value": "0", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": ";", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Identifier", "value": "i", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "<", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "value": "j", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": ";", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "++", "range": [ 23, 25 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 25 } } }, { "type": "Identifier", "value": "i", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } } ], "errors": [ { "index": 27, "lineNumber": 2, "column": 1, "message": "Error: Line 2: Unexpected end of input" } ] } esprima-4.0.1/test/fixtures/tolerant-parse/for-of-missing-parenthesis.js000066400000000000000000000000171331122015500264530ustar00rootroot00000000000000for (x of y esprima-4.0.1/test/fixtures/tolerant-parse/for-of-missing-parenthesis.tree.json000066400000000000000000000104011331122015500277440ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForOfStatement", "left": { "type": "Identifier", "name": "x", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "right": { "type": "Identifier", "name": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "body": { "range": [ 15, 15 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 0 } }, "type": "EmptyStatement" }, "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 3, "column": 0 } } } ], "sourceType": "script", "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 3, "column": 0 } }, "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "x", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "of", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "y", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } } ], "errors": [ { "index": 15, "lineNumber": 3, "column": 1, "message": "Error: Line 3: Unexpected end of input" } ] } esprima-4.0.1/test/fixtures/tolerant-parse/if-missing-parenthesis.js000066400000000000000000000000131331122015500256550ustar00rootroot00000000000000if (x < 42 esprima-4.0.1/test/fixtures/tolerant-parse/if-missing-parenthesis.tree.json000066400000000000000000000116721331122015500271650ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "IfStatement", "test": { "type": "BinaryExpression", "operator": "<", "left": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "right": { "type": "Literal", "value": 42, "raw": "42", "range": [ 8, 10 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 10 } } }, "range": [ 4, 10 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 10 } } }, "consequent": { "range": [ 11, 11 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 0 } }, "type": "EmptyStatement" }, "alternate": null, "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 0 } } } ], "sourceType": "script", "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 0 } }, "tokens": [ { "type": "Keyword", "value": "if", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "<", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Numeric", "value": "42", "range": [ 8, 10 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 10 } } } ], "errors": [ { "index": 11, "lineNumber": 2, "column": 1, "message": "Error: Line 2: Unexpected end of input" } ] } esprima-4.0.1/test/fixtures/tolerant-parse/let_eval.js000066400000000000000000000000301331122015500230570ustar00rootroot00000000000000"use strict"; let eval; esprima-4.0.1/test/fixtures/tolerant-parse/let_eval.tree.json000066400000000000000000000121471331122015500243660ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "eval", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, "init": null, "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } } ], "kind": "let", "range": [ 14, 23 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "let", "range": [ 14, 17 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "eval", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ";", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ], "errors": [ { "index": 22, "lineNumber": 1, "column": 23, "message": "Error: Line 1: Variable name may not be eval or arguments in strict mode" } ], "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0000.js000066400000000000000000000000031331122015500235170ustar00rootroot00000000000000/* esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0000.tree.json000066400000000000000000000016211331122015500250210ustar00rootroot00000000000000{ "type": "Program", "body": [], "sourceType": "script", "comments": [ { "type": "Block", "value": " ", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } ], "tokens": [], "errors": [ { "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Unexpected token ILLEGAL" } ], "range": [ 3, 3 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 3 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0001.js000066400000000000000000000000201331122015500235170ustar00rootroot00000000000000var foo = 1; /* esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0001.tree.json000066400000000000000000000121771331122015500250320ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "foo", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, "init": { "type": "Literal", "value": 1, "raw": "1", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, "range": [ 4, 11 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 11 } } } ], "kind": "var", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } } ], "sourceType": "script", "comments": [ { "type": "Block", "value": " ", "range": [ 13, 16 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 16 } } } ], "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "foo", "range": [ 4, 7 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "=", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Numeric", "value": "1", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ";", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } } ], "errors": [ { "index": 16, "lineNumber": 1, "column": 17, "message": "Error: Line 1: Unexpected token ILLEGAL" } ], "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0002.js000066400000000000000000000000171331122015500235260ustar00rootroot00000000000000/* var fo0 = 1;esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0002.tree.json000066400000000000000000000016451331122015500250310ustar00rootroot00000000000000{ "type": "Program", "body": [], "sourceType": "script", "comments": [ { "type": "Block", "value": " var fo0 = 1;", "range": [ 0, 15 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 15 } } } ], "tokens": [], "errors": [ { "index": 15, "lineNumber": 1, "column": 16, "message": "Error: Line 1: Unexpected token ILLEGAL" } ], "range": [ 15, 15 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 15 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0003.js000066400000000000000000000000201331122015500235210ustar00rootroot00000000000000/* /* if(foo) {}esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0003.tree.json000066400000000000000000000016461331122015500250330ustar00rootroot00000000000000{ "type": "Program", "body": [], "sourceType": "script", "comments": [ { "type": "Block", "value": " /* if(foo) {}", "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "tokens": [], "errors": [ { "index": 16, "lineNumber": 1, "column": 17, "message": "Error: Line 1: Unexpected token ILLEGAL" } ], "range": [ 16, 16 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0004.js000066400000000000000000000000111331122015500235220ustar00rootroot00000000000000/* foo esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0004.tree.json000066400000000000000000000016311331122015500250260ustar00rootroot00000000000000{ "type": "Program", "body": [], "sourceType": "script", "comments": [ { "type": "Block", "value": " foo \n\n", "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 3, "column": 0 } } } ], "tokens": [], "errors": [ { "index": 9, "lineNumber": 3, "column": 1, "message": "Error: Line 3: Unexpected token ILLEGAL" } ], "range": [ 9, 9 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 0 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0005.js000066400000000000000000000000111331122015500235230ustar00rootroot00000000000000f(a b c);esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0005.tree.json000066400000000000000000000152401331122015500250300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "arguments": [ { "type": "Identifier", "name": "a", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "name": "b", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "name": "c", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } } ], "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "(", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "a", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "b", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "c", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ")", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ";", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } } ], "errors": [ { "index": 4, "lineNumber": 1, "column": 5, "message": "Error: Line 1: Unexpected token b" }, { "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Unexpected token c" } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0006.js000066400000000000000000000000241331122015500235300ustar00rootroot00000000000000f(a function(){} c);esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0006.tree.json000066400000000000000000000222411331122015500250300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "arguments": [ { "type": "Identifier", "name": "a", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 14, 16 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 16 } } }, "generator": false, "expression": false, "async": false, "range": [ 4, 16 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "name": "c", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } } ], "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } }, "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "(", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "a", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Keyword", "value": "function", "range": [ 4, 12 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "(", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": ")", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "{", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "}", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "c", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ")", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": ";", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } } ], "errors": [ { "index": 4, "lineNumber": 1, "column": 5, "message": "Error: Line 1: Unexpected token function" }, { "index": 17, "lineNumber": 1, "column": 18, "message": "Error: Line 1: Unexpected token c" } ], "range": [ 0, 20 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 20 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0007.js000066400000000000000000000000121331122015500235260ustar00rootroot00000000000000f({} b c);esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0007.tree.json000066400000000000000000000161071331122015500250350ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "arguments": [ { "type": "ObjectExpression", "properties": [], "range": [ 2, 4 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "name": "b", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "name": "c", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } } ], "range": [ 0, 9 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 9 } } }, "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "f", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "(", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Punctuator", "value": "{", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "}", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "b", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Identifier", "value": "c", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ";", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } } ], "errors": [ { "index": 5, "lineNumber": 1, "column": 6, "message": "Error: Line 1: Unexpected token b" }, { "index": 7, "lineNumber": 1, "column": 8, "message": "Error: Line 1: Unexpected token c" } ], "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0008.js000066400000000000000000000000431331122015500235330ustar00rootroot00000000000000var o = {one: function() {} two:2};esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0008.tree.json000066400000000000000000000366111331122015500250400ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "o", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "one", "range": [ 9, 12 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 25, 27 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 27 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 27 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 27 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 9, 27 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 27 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "two", "range": [ 28, 31 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 31 } } }, "computed": false, "value": { "type": "Literal", "value": 2, "raw": "2", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 28, 33 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 33 } } } ], "range": [ 8, 34 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 34 } } }, "range": [ 4, 34 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 34 } } } ], "kind": "var", "range": [ 0, 35 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 35 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "o", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "one", "range": [ 9, 12 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ":", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "function", "range": [ 14, 22 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "(", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ")", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "{", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "}", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Identifier", "value": "two", "range": [ 28, 31 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": ":", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Numeric", "value": "2", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ";", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } } ], "errors": [ { "index": 28, "lineNumber": 1, "column": 29, "message": "Error: Line 1: Unexpected token two" } ], "range": [ 0, 35 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 35 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0009.js000066400000000000000000000000541331122015500235360ustar00rootroot00000000000000var o = {one: function() {} two:2 three: 3};esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0009.tree.json000066400000000000000000000465501331122015500250440ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "o", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "one", "range": [ 9, 12 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 25, 27 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 27 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 27 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 27 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 9, 27 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 27 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "two", "range": [ 28, 31 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 31 } } }, "computed": false, "value": { "type": "Literal", "value": 2, "raw": "2", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 28, 33 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 33 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "three", "range": [ 34, 39 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 39 } } }, "computed": false, "value": { "type": "Literal", "value": 3, "raw": "3", "range": [ 41, 42 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 42 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 34, 42 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 42 } } } ], "range": [ 8, 43 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 43 } } }, "range": [ 4, 43 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 43 } } } ], "kind": "var", "range": [ 0, 44 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 44 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "o", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "one", "range": [ 9, 12 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ":", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "function", "range": [ 14, 22 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "(", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ")", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "{", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "}", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Identifier", "value": "two", "range": [ 28, 31 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": ":", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Numeric", "value": "2", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Identifier", "value": "three", "range": [ 34, 39 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 39 } } }, { "type": "Punctuator", "value": ":", "range": [ 39, 40 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 40 } } }, { "type": "Numeric", "value": "3", "range": [ 41, 42 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 42 } } }, { "type": "Punctuator", "value": "}", "range": [ 42, 43 ], "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 43 } } }, { "type": "Punctuator", "value": ";", "range": [ 43, 44 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 44 } } } ], "errors": [ { "index": 28, "lineNumber": 1, "column": 29, "message": "Error: Line 1: Unexpected token two" }, { "index": 34, "lineNumber": 1, "column": 35, "message": "Error: Line 1: Unexpected token three" } ], "range": [ 0, 44 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 44 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0010.js000066400000000000000000000000661331122015500235310ustar00rootroot00000000000000var o = {one: function() {} two:2, three: 3 "four":4};esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0010.tree.json000066400000000000000000000571571331122015500250410ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "o", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "one", "range": [ 9, 12 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 25, 27 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 27 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 27 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 27 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 9, 27 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 27 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "two", "range": [ 28, 31 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 31 } } }, "computed": false, "value": { "type": "Literal", "value": 2, "raw": "2", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 28, 33 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 33 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "three", "range": [ 35, 40 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 40 } } }, "computed": false, "value": { "type": "Literal", "value": 3, "raw": "3", "range": [ 42, 43 ], "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 43 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 35, 43 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 43 } } }, { "type": "Property", "key": { "type": "Literal", "value": "four", "raw": "\"four\"", "range": [ 44, 50 ], "loc": { "start": { "line": 1, "column": 44 }, "end": { "line": 1, "column": 50 } } }, "computed": false, "value": { "type": "Literal", "value": 4, "raw": "4", "range": [ 51, 52 ], "loc": { "start": { "line": 1, "column": 51 }, "end": { "line": 1, "column": 52 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 44, 52 ], "loc": { "start": { "line": 1, "column": 44 }, "end": { "line": 1, "column": 52 } } } ], "range": [ 8, 53 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 53 } } }, "range": [ 4, 53 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 53 } } } ], "kind": "var", "range": [ 0, 54 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 54 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "o", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "one", "range": [ 9, 12 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ":", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "function", "range": [ 14, 22 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "(", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ")", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "{", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "}", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Identifier", "value": "two", "range": [ 28, 31 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": ":", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Numeric", "value": "2", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": ",", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Identifier", "value": "three", "range": [ 35, 40 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 40 } } }, { "type": "Punctuator", "value": ":", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } }, { "type": "Numeric", "value": "3", "range": [ 42, 43 ], "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 43 } } }, { "type": "String", "value": "\"four\"", "range": [ 44, 50 ], "loc": { "start": { "line": 1, "column": 44 }, "end": { "line": 1, "column": 50 } } }, { "type": "Punctuator", "value": ":", "range": [ 50, 51 ], "loc": { "start": { "line": 1, "column": 50 }, "end": { "line": 1, "column": 51 } } }, { "type": "Numeric", "value": "4", "range": [ 51, 52 ], "loc": { "start": { "line": 1, "column": 51 }, "end": { "line": 1, "column": 52 } } }, { "type": "Punctuator", "value": "}", "range": [ 52, 53 ], "loc": { "start": { "line": 1, "column": 52 }, "end": { "line": 1, "column": 53 } } }, { "type": "Punctuator", "value": ";", "range": [ 53, 54 ], "loc": { "start": { "line": 1, "column": 53 }, "end": { "line": 1, "column": 54 } } } ], "errors": [ { "index": 28, "lineNumber": 1, "column": 29, "message": "Error: Line 1: Unexpected token two" }, { "index": 44, "lineNumber": 1, "column": 45, "message": "Error: Line 1: Unexpected token four" } ], "range": [ 0, 54 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 54 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0011.js000066400000000000000000000001051331122015500235240ustar00rootroot00000000000000var o = {one: function() {} two:2, three: {aa: "a" bb: "b"} four: 4};esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0011.tree.json000066400000000000000000001021471331122015500250300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "o", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "one", "range": [ 9, 12 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 25, 27 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 27 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 27 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 27 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 9, 27 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 27 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "two", "range": [ 28, 31 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 31 } } }, "computed": false, "value": { "type": "Literal", "value": 2, "raw": "2", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 28, 33 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 33 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "three", "range": [ 35, 40 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 40 } } }, "computed": false, "value": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "aa", "range": [ 43, 45 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 45 } } }, "computed": false, "value": { "type": "Literal", "value": "a", "raw": "\"a\"", "range": [ 47, 50 ], "loc": { "start": { "line": 1, "column": 47 }, "end": { "line": 1, "column": 50 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 43, 50 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 50 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "bb", "range": [ 51, 53 ], "loc": { "start": { "line": 1, "column": 51 }, "end": { "line": 1, "column": 53 } } }, "computed": false, "value": { "type": "Literal", "value": "b", "raw": "\"b\"", "range": [ 55, 58 ], "loc": { "start": { "line": 1, "column": 55 }, "end": { "line": 1, "column": 58 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 51, 58 ], "loc": { "start": { "line": 1, "column": 51 }, "end": { "line": 1, "column": 58 } } } ], "range": [ 42, 59 ], "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 59 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 35, 59 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 59 } } }, { "type": "Property", "key": { "type": "Identifier", "name": "four", "range": [ 60, 64 ], "loc": { "start": { "line": 1, "column": 60 }, "end": { "line": 1, "column": 64 } } }, "computed": false, "value": { "type": "Literal", "value": 4, "raw": "4", "range": [ 66, 67 ], "loc": { "start": { "line": 1, "column": 66 }, "end": { "line": 1, "column": 67 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 60, 67 ], "loc": { "start": { "line": 1, "column": 60 }, "end": { "line": 1, "column": 67 } } } ], "range": [ 8, 68 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 68 } } }, "range": [ 4, 68 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 68 } } } ], "kind": "var", "range": [ 0, 69 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 69 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "o", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": "{", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Identifier", "value": "one", "range": [ 9, 12 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ":", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "function", "range": [ 14, 22 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "(", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": ")", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "{", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "}", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Identifier", "value": "two", "range": [ 28, 31 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": ":", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Numeric", "value": "2", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": ",", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Identifier", "value": "three", "range": [ 35, 40 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 40 } } }, { "type": "Punctuator", "value": ":", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } }, { "type": "Punctuator", "value": "{", "range": [ 42, 43 ], "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 43 } } }, { "type": "Identifier", "value": "aa", "range": [ 43, 45 ], "loc": { "start": { "line": 1, "column": 43 }, "end": { "line": 1, "column": 45 } } }, { "type": "Punctuator", "value": ":", "range": [ 45, 46 ], "loc": { "start": { "line": 1, "column": 45 }, "end": { "line": 1, "column": 46 } } }, { "type": "String", "value": "\"a\"", "range": [ 47, 50 ], "loc": { "start": { "line": 1, "column": 47 }, "end": { "line": 1, "column": 50 } } }, { "type": "Identifier", "value": "bb", "range": [ 51, 53 ], "loc": { "start": { "line": 1, "column": 51 }, "end": { "line": 1, "column": 53 } } }, { "type": "Punctuator", "value": ":", "range": [ 53, 54 ], "loc": { "start": { "line": 1, "column": 53 }, "end": { "line": 1, "column": 54 } } }, { "type": "String", "value": "\"b\"", "range": [ 55, 58 ], "loc": { "start": { "line": 1, "column": 55 }, "end": { "line": 1, "column": 58 } } }, { "type": "Punctuator", "value": "}", "range": [ 58, 59 ], "loc": { "start": { "line": 1, "column": 58 }, "end": { "line": 1, "column": 59 } } }, { "type": "Identifier", "value": "four", "range": [ 60, 64 ], "loc": { "start": { "line": 1, "column": 60 }, "end": { "line": 1, "column": 64 } } }, { "type": "Punctuator", "value": ":", "range": [ 64, 65 ], "loc": { "start": { "line": 1, "column": 64 }, "end": { "line": 1, "column": 65 } } }, { "type": "Numeric", "value": "4", "range": [ 66, 67 ], "loc": { "start": { "line": 1, "column": 66 }, "end": { "line": 1, "column": 67 } } }, { "type": "Punctuator", "value": "}", "range": [ 67, 68 ], "loc": { "start": { "line": 1, "column": 67 }, "end": { "line": 1, "column": 68 } } }, { "type": "Punctuator", "value": ";", "range": [ 68, 69 ], "loc": { "start": { "line": 1, "column": 68 }, "end": { "line": 1, "column": 69 } } } ], "errors": [ { "index": 28, "lineNumber": 1, "column": 29, "message": "Error: Line 1: Unexpected token two" }, { "index": 51, "lineNumber": 1, "column": 52, "message": "Error: Line 1: Unexpected token bb" }, { "index": 60, "lineNumber": 1, "column": 61, "message": "Error: Line 1: Unexpected token four" } ], "range": [ 0, 69 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 69 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0012.js000066400000000000000000000000151331122015500235250ustar00rootroot00000000000000x = { y: z; }esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0012.tree.json000066400000000000000000000177661331122015500250450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "y", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, "computed": false, "value": { "type": "Identifier", "name": "z", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 6, 10 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 10 } } } ], "range": [ 4, 13 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "x", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "{", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Identifier", "value": "y", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Punctuator", "value": ":", "range": [ 7, 8 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "z", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": ";", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "}", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } } ], "errors": [ { "index": 10, "lineNumber": 1, "column": 11, "message": "Error: Line 1: Unexpected token ;" } ], "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0013.js000066400000000000000000000000061331122015500235260ustar00rootroot00000000000000returnesprima-4.0.1/test/fixtures/tolerant-parse/migrated_0013.tree.json000066400000000000000000000024471331122015500250340ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ReturnStatement", "argument": null, "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "return", "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } ], "errors": [ { "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Illegal return statement" } ], "range": [ 0, 6 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 6 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0014.js000066400000000000000000000000531331122015500235310ustar00rootroot00000000000000(function () { 'use strict'; with (i); }())esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0014.tree.json000066400000000000000000000322161331122015500250320ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "'use strict'", "range": [ 15, 27 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 27 } } }, "directive": "use strict", "range": [ 15, 28 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 28 } } }, { "type": "WithStatement", "object": { "type": "Identifier", "name": "i", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, "body": { "type": "EmptyStatement", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, "range": [ 29, 38 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 38 } } } ], "range": [ 13, 40 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 40 } } }, "generator": false, "expression": false, "async": false, "range": [ 1, 40 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 40 } } }, "arguments": [], "range": [ 1, 42 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 42 } } }, "range": [ 0, 43 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 43 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "function", "range": [ 1, 9 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "String", "value": "'use strict'", "range": [ 15, 27 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": ";", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Keyword", "value": "with", "range": [ 29, 33 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "(", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Identifier", "value": "i", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": ")", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": ";", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": "}", "range": [ 39, 40 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 40 } } }, { "type": "Punctuator", "value": "(", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } }, { "type": "Punctuator", "value": ")", "range": [ 41, 42 ], "loc": { "start": { "line": 1, "column": 41 }, "end": { "line": 1, "column": 42 } } }, { "type": "Punctuator", "value": ")", "range": [ 42, 43 ], "loc": { "start": { "line": 1, "column": 42 }, "end": { "line": 1, "column": 43 } } } ], "errors": [ { "index": 28, "lineNumber": 1, "column": 29, "message": "Error: Line 1: Strict mode code may not include a with statement" } ], "range": [ 0, 43 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 43 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0015.js000066400000000000000000000000451331122015500235330ustar00rootroot00000000000000(function () { 'use strict'; 021 }())esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0015.tree.json000066400000000000000000000254671331122015500250450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "CallExpression", "callee": { "type": "FunctionExpression", "id": null, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "'use strict'", "range": [ 15, 27 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 27 } } }, "directive": "use strict", "range": [ 15, 28 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 28 } } }, { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 17, "raw": "021", "range": [ 29, 32 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 32 } } }, "range": [ 29, 33 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 33 } } } ], "range": [ 13, 34 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 34 } } }, "generator": false, "expression": false, "async": false, "range": [ 1, 34 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 34 } } }, "arguments": [], "range": [ 1, 36 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 36 } } }, "range": [ 0, 37 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 37 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Keyword", "value": "function", "range": [ 1, 9 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "(", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": ")", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": "{", "range": [ 13, 14 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 14 } } }, { "type": "String", "value": "'use strict'", "range": [ 15, 27 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": ";", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Numeric", "value": "021", "range": [ 29, 32 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "(", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": ")", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": ")", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } } ], "errors": [ { "index": 29, "lineNumber": 1, "column": 30, "message": "Error: Line 1: Octal literals are not allowed in strict mode." } ], "range": [ 0, 37 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 37 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0016.js000066400000000000000000000000261331122015500235330ustar00rootroot00000000000000"use strict"; delete xesprima-4.0.1/test/fixtures/tolerant-parse/migrated_0016.tree.json000066400000000000000000000110461331122015500250320ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "UnaryExpression", "operator": "delete", "argument": { "type": "Identifier", "name": "x", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, "prefix": true, "range": [ 14, 22 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } } }, "range": [ 14, 22 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "delete", "range": [ 14, 20 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 20 } } }, { "type": "Identifier", "value": "x", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } } ], "errors": [ { "index": 22, "lineNumber": 1, "column": 23, "message": "Error: Line 1: Delete of an unqualified identifier in strict mode." } ], "range": [ 0, 22 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 22 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0017.js000066400000000000000000000000441331122015500235340ustar00rootroot00000000000000"use strict"; try {} catch (eval) {}esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0017.tree.json000066400000000000000000000205201331122015500250300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "TryStatement", "block": { "type": "BlockStatement", "body": [], "range": [ 18, 20 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 20 } } }, "handler": { "type": "CatchClause", "param": { "type": "Identifier", "name": "eval", "range": [ 28, 32 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 32 } } }, "body": { "type": "BlockStatement", "body": [], "range": [ 34, 36 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 36 } } }, "range": [ 21, 36 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 36 } } }, "finalizer": null, "range": [ 14, 36 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 36 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "try", "range": [ 14, 17 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "}", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Keyword", "value": "catch", "range": [ 21, 26 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "(", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Identifier", "value": "eval", "range": [ 28, 32 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": ")", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "{", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": "}", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } } ], "errors": [ { "index": 32, "lineNumber": 1, "column": 33, "message": "Error: Line 1: Catch variable may not be eval or arguments in strict mode" } ], "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0018.js000066400000000000000000000000511331122015500235330ustar00rootroot00000000000000"use strict"; try {} catch (arguments) {}esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0018.tree.json000066400000000000000000000205321331122015500250340ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "TryStatement", "block": { "type": "BlockStatement", "body": [], "range": [ 18, 20 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 20 } } }, "handler": { "type": "CatchClause", "param": { "type": "Identifier", "name": "arguments", "range": [ 28, 37 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 37 } } }, "body": { "type": "BlockStatement", "body": [], "range": [ 39, 41 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 41 } } }, "range": [ 21, 41 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 41 } } }, "finalizer": null, "range": [ 14, 41 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 41 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "try", "range": [ 14, 17 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "}", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Keyword", "value": "catch", "range": [ 21, 26 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 26 } } }, { "type": "Punctuator", "value": "(", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Identifier", "value": "arguments", "range": [ 28, 37 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": ")", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": "{", "range": [ 39, 40 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 40 } } }, { "type": "Punctuator", "value": "}", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } } ], "errors": [ { "index": 37, "lineNumber": 1, "column": 38, "message": "Error: Line 1: Catch variable may not be eval or arguments in strict mode" } ], "range": [ 0, 41 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 41 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0019.js000066400000000000000000000000271331122015500235370ustar00rootroot00000000000000"use strict"; var eval;esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0019.tree.json000066400000000000000000000121471331122015500250400ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "eval", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, "init": null, "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } } ], "kind": "var", "range": [ 14, 23 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "var", "range": [ 14, 17 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "eval", "range": [ 18, 22 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ";", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ], "errors": [ { "index": 22, "lineNumber": 1, "column": 23, "message": "Error: Line 1: Variable name may not be eval or arguments in strict mode" } ], "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0020.js000066400000000000000000000000341331122015500235250ustar00rootroot00000000000000"use strict"; var arguments;esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0020.tree.json000066400000000000000000000121611331122015500250240ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "arguments", "range": [ 18, 27 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 27 } } }, "init": null, "range": [ 18, 27 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 27 } } } ], "kind": "var", "range": [ 14, 28 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 28 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "var", "range": [ 14, 17 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "arguments", "range": [ 18, 27 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": ";", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } } ], "errors": [ { "index": 27, "lineNumber": 1, "column": 28, "message": "Error: Line 1: Variable name may not be eval or arguments in strict mode" } ], "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0021.js000066400000000000000000000000271331122015500235300ustar00rootroot00000000000000"use strict"; eval = 0;esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0021.tree.json000066400000000000000000000136171331122015500250340ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "eval", "range": [ 14, 18 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 18 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, "range": [ 14, 22 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } } }, "range": [ 14, 23 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "eval", "range": [ 14, 18 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "=", "range": [ 19, 20 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 20 } } }, { "type": "Numeric", "value": "0", "range": [ 21, 22 ], "loc": { "start": { "line": 1, "column": 21 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ";", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } } ], "errors": [ { "index": 14, "lineNumber": 1, "column": 15, "message": "Error: Line 1: Assignment to eval or arguments is not allowed in strict mode" } ], "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0022.js000066400000000000000000000000251331122015500235270ustar00rootroot00000000000000"use strict"; eval++;esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0022.tree.json000066400000000000000000000117411331122015500250310ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "eval", "range": [ 14, 18 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 18 } } }, "prefix": false, "range": [ 14, 20 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 20 } } }, "range": [ 14, 21 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 21 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "eval", "range": [ 14, 18 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": "++", "range": [ 18, 20 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": ";", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } } ], "errors": [ { "index": 18, "lineNumber": 1, "column": 19, "message": "Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode" } ], "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0023.js000066400000000000000000000000251331122015500235300ustar00rootroot00000000000000"use strict"; --eval;esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0023.tree.json000066400000000000000000000117371331122015500250370ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "--", "argument": { "type": "Identifier", "name": "eval", "range": [ 16, 20 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 20 } } }, "prefix": true, "range": [ 14, 20 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 20 } } }, "range": [ 14, 21 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 21 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "--", "range": [ 14, 16 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "eval", "range": [ 16, 20 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 20 } } }, { "type": "Punctuator", "value": ";", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } } ], "errors": [ { "index": 20, "lineNumber": 1, "column": 21, "message": "Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode" } ], "range": [ 0, 21 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 21 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0024.js000066400000000000000000000000341331122015500235310ustar00rootroot00000000000000"use strict"; arguments = 0;esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0024.tree.json000066400000000000000000000136311331122015500250330ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "arguments", "range": [ 14, 23 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 23 } } }, "right": { "type": "Literal", "value": 0, "raw": "0", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, "range": [ 14, 27 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 27 } } }, "range": [ 14, 28 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 28 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "arguments", "range": [ 14, 23 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "=", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Numeric", "value": "0", "range": [ 26, 27 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": ";", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } } ], "errors": [ { "index": 14, "lineNumber": 1, "column": 15, "message": "Error: Line 1: Assignment to eval or arguments is not allowed in strict mode" } ], "range": [ 0, 28 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 28 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0025.js000066400000000000000000000000321331122015500235300ustar00rootroot00000000000000"use strict"; arguments--;esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0025.tree.json000066400000000000000000000117531331122015500250370ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "--", "argument": { "type": "Identifier", "name": "arguments", "range": [ 14, 23 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 23 } } }, "prefix": false, "range": [ 14, 25 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 25 } } }, "range": [ 14, 26 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 26 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "arguments", "range": [ 14, 23 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "--", "range": [ 23, 25 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ";", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } } ], "errors": [ { "index": 23, "lineNumber": 1, "column": 24, "message": "Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode" } ], "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0026.js000066400000000000000000000000321331122015500235310ustar00rootroot00000000000000"use strict"; ++arguments;esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0026.tree.json000066400000000000000000000117511331122015500250360ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Identifier", "name": "arguments", "range": [ 16, 25 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 25 } } }, "prefix": true, "range": [ 14, 25 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 25 } } }, "range": [ 14, 26 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 26 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "++", "range": [ 14, 16 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 16 } } }, { "type": "Identifier", "value": "arguments", "range": [ 16, 25 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ";", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } } ], "errors": [ { "index": 25, "lineNumber": 1, "column": 26, "message": "Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode" } ], "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0027.js000066400000000000000000000000411331122015500235320ustar00rootroot00000000000000"use strict"; function eval() {};esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0027.tree.json000066400000000000000000000156621331122015500250440ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "eval", "range": [ 23, 27 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 27 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 30, 32 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 32 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 32 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 32 } } }, { "type": "EmptyStatement", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "function", "range": [ 14, 22 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "eval", "range": [ 23, 27 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": "(", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": ")", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": "{", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "}", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": ";", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } } ], "errors": [ { "index": 23, "lineNumber": 1, "column": 24, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" } ], "range": [ 0, 33 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 33 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0028.js000066400000000000000000000000461331122015500235400ustar00rootroot00000000000000"use strict"; function arguments() {};esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0028.tree.json000066400000000000000000000156741331122015500250500ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "arguments", "range": [ 23, 32 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 32 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 35, 37 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 37 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 37 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 37 } } }, { "type": "EmptyStatement", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "function", "range": [ 14, 22 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "arguments", "range": [ 23, 32 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "(", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": ")", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "{", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": "}", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": ";", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } } ], "errors": [ { "index": 23, "lineNumber": 1, "column": 24, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" } ], "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0029.js000066400000000000000000000000461331122015500235410ustar00rootroot00000000000000"use strict"; function interface() {};esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0029.tree.json000066400000000000000000000156521331122015500250450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "interface", "range": [ 23, 32 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 32 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 35, 37 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 37 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 37 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 37 } } }, { "type": "EmptyStatement", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "function", "range": [ 14, 22 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } } }, { "type": "Keyword", "value": "interface", "range": [ 23, 32 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "(", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": ")", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "{", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": "}", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": ";", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } } ], "errors": [ { "index": 23, "lineNumber": 1, "column": 24, "message": "Error: Line 1: Use of future reserved word in strict mode" } ], "range": [ 0, 38 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 38 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0030.js000066400000000000000000000000431331122015500235260ustar00rootroot00000000000000"use strict"; (function eval() {});esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0030.tree.json000066400000000000000000000177341331122015500250400ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "FunctionExpression", "id": { "type": "Identifier", "name": "eval", "range": [ 24, 28 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 28 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 31, 33 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 33 } } }, "generator": false, "expression": false, "async": false, "range": [ 15, 33 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 33 } } }, "range": [ 14, 35 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 35 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Keyword", "value": "function", "range": [ 15, 23 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "eval", "range": [ 24, 28 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": "(", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": ")", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": "{", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "}", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": ")", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ";", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } } ], "errors": [ { "index": 24, "lineNumber": 1, "column": 25, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" } ], "range": [ 0, 35 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 35 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0031.js000066400000000000000000000000501331122015500235250ustar00rootroot00000000000000"use strict"; (function arguments() {});esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0031.tree.json000066400000000000000000000177461331122015500250440ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "FunctionExpression", "id": { "type": "Identifier", "name": "arguments", "range": [ 24, 33 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 33 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 36, 38 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 38 } } }, "generator": false, "expression": false, "async": false, "range": [ 15, 38 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 38 } } }, "range": [ 14, 40 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 40 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Keyword", "value": "function", "range": [ 15, 23 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "arguments", "range": [ 24, 33 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "(", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ")", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": "{", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": "}", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": ")", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, { "type": "Punctuator", "value": ";", "range": [ 39, 40 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 40 } } } ], "errors": [ { "index": 24, "lineNumber": 1, "column": 25, "message": "Error: Line 1: Function name may not be eval or arguments in strict mode" } ], "range": [ 0, 40 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 40 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0032.js000066400000000000000000000000501331122015500235260ustar00rootroot00000000000000"use strict"; (function interface() {});esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0032.tree.json000066400000000000000000000177241331122015500250410ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "FunctionExpression", "id": { "type": "Identifier", "name": "interface", "range": [ 24, 33 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 33 } } }, "params": [], "body": { "type": "BlockStatement", "body": [], "range": [ 36, 38 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 38 } } }, "generator": false, "expression": false, "async": false, "range": [ 15, 38 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 38 } } }, "range": [ 14, 40 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 40 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Keyword", "value": "function", "range": [ 15, 23 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 23 } } }, { "type": "Keyword", "value": "interface", "range": [ 24, 33 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "(", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ")", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": "{", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": "}", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": ")", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, { "type": "Punctuator", "value": ";", "range": [ 39, 40 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 40 } } } ], "errors": [ { "index": 24, "lineNumber": 1, "column": 25, "message": "Error: Line 1: Use of future reserved word in strict mode" } ], "range": [ 0, 40 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 40 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0033.js000066400000000000000000000000421331122015500235300ustar00rootroot00000000000000"use strict"; function f(eval) {};esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0033.tree.json000066400000000000000000000176061331122015500250410ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, "params": [ { "type": "Identifier", "name": "eval", "range": [ 25, 29 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 29 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 31, 33 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 33 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 33 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 33 } } }, { "type": "EmptyStatement", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "function", "range": [ 14, 22 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "f", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "(", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Identifier", "value": "eval", "range": [ 25, 29 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": ")", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": "{", "range": [ 31, 32 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 32 } } }, { "type": "Punctuator", "value": "}", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": ";", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } } ], "errors": [ { "index": 25, "lineNumber": 1, "column": 26, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" } ], "range": [ 0, 34 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 34 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0034.js000066400000000000000000000000471331122015500235360ustar00rootroot00000000000000"use strict"; function f(arguments) {};esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0034.tree.json000066400000000000000000000176201331122015500250360ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, "params": [ { "type": "Identifier", "name": "arguments", "range": [ 25, 34 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 34 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 36, 38 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 38 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 38 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 38 } } }, { "type": "EmptyStatement", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "function", "range": [ 14, 22 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "f", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "(", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Identifier", "value": "arguments", "range": [ 25, 34 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ")", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": "{", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": "}", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": ";", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } } ], "errors": [ { "index": 25, "lineNumber": 1, "column": 26, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" } ], "range": [ 0, 39 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 39 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0035.js000066400000000000000000000000471331122015500235370ustar00rootroot00000000000000"use strict"; function f(foo, foo) {};esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0035.tree.json000066400000000000000000000223421331122015500250340ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "f", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, "params": [ { "type": "Identifier", "name": "foo", "range": [ 25, 28 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 28 } } }, { "type": "Identifier", "name": "foo", "range": [ 31, 34 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 34 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 36, 38 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 38 } } }, "generator": false, "expression": false, "async": false, "range": [ 14, 38 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 38 } } }, { "type": "EmptyStatement", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "function", "range": [ 14, 22 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } } }, { "type": "Identifier", "value": "f", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "(", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Identifier", "value": "foo", "range": [ 25, 28 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 28 } } }, { "type": "Punctuator", "value": ",", "range": [ 28, 29 ], "loc": { "start": { "line": 1, "column": 28 }, "end": { "line": 1, "column": 29 } } }, { "type": "Identifier", "value": "foo", "range": [ 31, 34 ], "loc": { "start": { "line": 1, "column": 31 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ")", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": "{", "range": [ 36, 37 ], "loc": { "start": { "line": 1, "column": 36 }, "end": { "line": 1, "column": 37 } } }, { "type": "Punctuator", "value": "}", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": ";", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } } ], "errors": [ { "index": 31, "lineNumber": 1, "column": 32, "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" } ], "range": [ 0, 39 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 39 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0036.js000066400000000000000000000000441331122015500235350ustar00rootroot00000000000000"use strict"; (function f(eval) {});esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0036.tree.json000066400000000000000000000217741331122015500250450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "FunctionExpression", "id": { "type": "Identifier", "name": "f", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, "params": [ { "type": "Identifier", "name": "eval", "range": [ 26, 30 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 30 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 32, 34 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 34 } } }, "generator": false, "expression": false, "async": false, "range": [ 15, 34 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 34 } } }, "range": [ 14, 36 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 36 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Keyword", "value": "function", "range": [ 15, 23 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "f", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "(", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "eval", "range": [ 26, 30 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": ")", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "{", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": ")", "range": [ 34, 35 ], "loc": { "start": { "line": 1, "column": 34 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": ";", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } } ], "errors": [ { "index": 26, "lineNumber": 1, "column": 27, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" } ], "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0037.js000066400000000000000000000000511331122015500235340ustar00rootroot00000000000000"use strict"; (function f(arguments) {});esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0037.tree.json000066400000000000000000000220061331122015500250330ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "FunctionExpression", "id": { "type": "Identifier", "name": "f", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, "params": [ { "type": "Identifier", "name": "arguments", "range": [ 26, 35 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 35 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 37, 39 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 39 } } }, "generator": false, "expression": false, "async": false, "range": [ 15, 39 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 39 } } }, "range": [ 14, 41 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 41 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Keyword", "value": "function", "range": [ 15, 23 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "f", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "(", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "arguments", "range": [ 26, 35 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": ")", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": "{", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": "}", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, { "type": "Punctuator", "value": ")", "range": [ 39, 40 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 40 } } }, { "type": "Punctuator", "value": ";", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } } ], "errors": [ { "index": 26, "lineNumber": 1, "column": 27, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" } ], "range": [ 0, 41 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 41 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0038.js000066400000000000000000000000511331122015500235350ustar00rootroot00000000000000"use strict"; (function f(foo, foo) {});esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0038.tree.json000066400000000000000000000246401331122015500250420ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "FunctionExpression", "id": { "type": "Identifier", "name": "f", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, "params": [ { "type": "Identifier", "name": "foo", "range": [ 26, 29 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 29 } } }, { "type": "Identifier", "name": "foo", "range": [ 32, 35 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 35 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 37, 39 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 39 } } }, "generator": false, "expression": false, "async": false, "range": [ 15, 39 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 39 } } }, "range": [ 14, 41 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 41 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Keyword", "value": "function", "range": [ 15, 23 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "f", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "(", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "foo", "range": [ 26, 29 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 29 } } }, { "type": "Punctuator", "value": ",", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Identifier", "value": "foo", "range": [ 32, 35 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 35 } } }, { "type": "Punctuator", "value": ")", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } }, { "type": "Punctuator", "value": "{", "range": [ 37, 38 ], "loc": { "start": { "line": 1, "column": 37 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": "}", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, { "type": "Punctuator", "value": ")", "range": [ 39, 40 ], "loc": { "start": { "line": 1, "column": 39 }, "end": { "line": 1, "column": 40 } } }, { "type": "Punctuator", "value": ";", "range": [ 40, 41 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 41 } } } ], "errors": [ { "index": 32, "lineNumber": 1, "column": 33, "message": "Error: Line 1: Strict mode function may not have duplicate parameter names" } ], "range": [ 0, 41 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 41 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0039.js000066400000000000000000000000441331122015500235400ustar00rootroot00000000000000"use strict"; x = { set f(eval) {} }esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0039.tree.json000066400000000000000000000317701331122015500250450ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Identifier", "name": "x", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, "right": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "f", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "eval", "range": [ 26, 30 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 30 } } } ], "body": { "type": "BlockStatement", "body": [], "range": [ 32, 34 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 34 } } }, "generator": false, "expression": false, "async": false, "range": [ 25, 34 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 34 } } }, "kind": "set", "method": false, "shorthand": false, "range": [ 20, 34 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 34 } } } ], "range": [ 18, 36 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 36 } } }, "range": [ 14, 36 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 36 } } }, "range": [ 14, 36 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 36 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Identifier", "value": "x", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "=", "range": [ 16, 17 ], "loc": { "start": { "line": 1, "column": 16 }, "end": { "line": 1, "column": 17 } } }, { "type": "Punctuator", "value": "{", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Identifier", "value": "set", "range": [ 20, 23 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 23 } } }, { "type": "Identifier", "value": "f", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": "(", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } }, { "type": "Identifier", "value": "eval", "range": [ 26, 30 ], "loc": { "start": { "line": 1, "column": 26 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": ")", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } }, { "type": "Punctuator", "value": "{", "range": [ 32, 33 ], "loc": { "start": { "line": 1, "column": 32 }, "end": { "line": 1, "column": 33 } } }, { "type": "Punctuator", "value": "}", "range": [ 33, 34 ], "loc": { "start": { "line": 1, "column": 33 }, "end": { "line": 1, "column": 34 } } }, { "type": "Punctuator", "value": "}", "range": [ 35, 36 ], "loc": { "start": { "line": 1, "column": 35 }, "end": { "line": 1, "column": 36 } } } ], "errors": [ { "index": 26, "lineNumber": 1, "column": 27, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" } ], "range": [ 0, 36 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 36 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0040.js000066400000000000000000000000671331122015500235350ustar00rootroot00000000000000function hello() { "octal directive\1"; "use strict"; }esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0040.tree.json000066400000000000000000000214761331122015500250370ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "FunctionDeclaration", "id": { "type": "Identifier", "name": "hello", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, "params": [], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "octal directive\u0001", "raw": "\"octal directive\\1\"", "range": [ 19, 38 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 38 } } }, "directive": "octal directive\\1", "range": [ 19, 39 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 39 } } }, { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 40, 52 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 52 } } }, "directive": "use strict", "range": [ 40, 53 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 53 } } } ], "range": [ 17, 55 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 55 } } }, "generator": false, "expression": false, "async": false, "range": [ 0, 55 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 55 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "function", "range": [ 0, 8 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 8 } } }, { "type": "Identifier", "value": "hello", "range": [ 9, 14 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 14 } } }, { "type": "Punctuator", "value": "(", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ")", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } }, { "type": "Punctuator", "value": "{", "range": [ 17, 18 ], "loc": { "start": { "line": 1, "column": 17 }, "end": { "line": 1, "column": 18 } } }, { "type": "String", "value": "\"octal directive\\1\"", "range": [ 19, 38 ], "loc": { "start": { "line": 1, "column": 19 }, "end": { "line": 1, "column": 38 } } }, { "type": "Punctuator", "value": ";", "range": [ 38, 39 ], "loc": { "start": { "line": 1, "column": 38 }, "end": { "line": 1, "column": 39 } } }, { "type": "String", "value": "\"use strict\"", "range": [ 40, 52 ], "loc": { "start": { "line": 1, "column": 40 }, "end": { "line": 1, "column": 52 } } }, { "type": "Punctuator", "value": ";", "range": [ 52, 53 ], "loc": { "start": { "line": 1, "column": 52 }, "end": { "line": 1, "column": 53 } } }, { "type": "Punctuator", "value": "}", "range": [ 54, 55 ], "loc": { "start": { "line": 1, "column": 54 }, "end": { "line": 1, "column": 55 } } } ], "errors": [ { "index": 19, "lineNumber": 1, "column": 20, "message": "Error: Line 1: Octal literals are not allowed in strict mode." } ], "range": [ 0, 55 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 55 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0041.js000066400000000000000000000000231331122015500235260ustar00rootroot00000000000000"\1"; 'use strict';esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0041.tree.json000066400000000000000000000077551331122015500250440ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "\u0001", "raw": "\"\\1\"", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, "directive": "\\1", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "'use strict'", "range": [ 6, 18 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 18 } } }, "directive": "use strict", "range": [ 6, 19 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 19 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"\\1\"", "range": [ 0, 4 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 4 } } }, { "type": "Punctuator", "value": ";", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "String", "value": "'use strict'", "range": [ 6, 18 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 18 } } }, { "type": "Punctuator", "value": ";", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } } ], "errors": [ { "index": 0, "lineNumber": 1, "column": 1, "message": "Error: Line 1: Octal literals are not allowed in strict mode." } ], "range": [ 0, 19 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 19 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0042.js000066400000000000000000000000371331122015500235340ustar00rootroot00000000000000"use strict"; var x = { 014: 3}esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0042.tree.json000066400000000000000000000245451331122015500250410ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, "directive": "use strict", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 13 } } }, { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, "init": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Literal", "value": 12, "raw": "014", "range": [ 24, 27 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 27 } } }, "computed": false, "value": { "type": "Literal", "value": 3, "raw": "3", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, "kind": "init", "method": false, "shorthand": false, "range": [ 24, 30 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 30 } } } ], "range": [ 22, 31 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 31 } } }, "range": [ 18, 31 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 31 } } } ], "kind": "var", "range": [ 14, 31 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 31 } } } ], "sourceType": "script", "tokens": [ { "type": "String", "value": "\"use strict\"", "range": [ 0, 12 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ";", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Keyword", "value": "var", "range": [ 14, 17 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 17 } } }, { "type": "Identifier", "value": "x", "range": [ 18, 19 ], "loc": { "start": { "line": 1, "column": 18 }, "end": { "line": 1, "column": 19 } } }, { "type": "Punctuator", "value": "=", "range": [ 20, 21 ], "loc": { "start": { "line": 1, "column": 20 }, "end": { "line": 1, "column": 21 } } }, { "type": "Punctuator", "value": "{", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Numeric", "value": "014", "range": [ 24, 27 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 27 } } }, { "type": "Punctuator", "value": ":", "range": [ 27, 28 ], "loc": { "start": { "line": 1, "column": 27 }, "end": { "line": 1, "column": 28 } } }, { "type": "Numeric", "value": "3", "range": [ 29, 30 ], "loc": { "start": { "line": 1, "column": 29 }, "end": { "line": 1, "column": 30 } } }, { "type": "Punctuator", "value": "}", "range": [ 30, 31 ], "loc": { "start": { "line": 1, "column": 30 }, "end": { "line": 1, "column": 31 } } } ], "errors": [ { "index": 24, "lineNumber": 1, "column": 25, "message": "Error: Line 1: Octal literals are not allowed in strict mode." } ], "range": [ 0, 31 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0044.js000066400000000000000000000000201331122015500235260ustar00rootroot00000000000000foo("bar") = bazesprima-4.0.1/test/fixtures/tolerant-parse/migrated_0044.tree.json000066400000000000000000000143611331122015500250360ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "CallExpression", "callee": { "type": "Identifier", "name": "foo", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, "arguments": [ { "type": "Literal", "value": "bar", "raw": "\"bar\"", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } } ], "range": [ 0, 10 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 10 } } }, "right": { "type": "Identifier", "name": "baz", "range": [ 13, 16 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 16 } } }, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } }, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "Identifier", "value": "foo", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "String", "value": "\"bar\"", "range": [ 4, 9 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": ")", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "Punctuator", "value": "=", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Identifier", "value": "baz", "range": [ 13, 16 ], "loc": { "start": { "line": 1, "column": 13 }, "end": { "line": 1, "column": 16 } } } ], "errors": [ { "index": 10, "lineNumber": 1, "column": 11, "message": "Error: Line 1: Invalid left-hand side in assignment" } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0045.js000066400000000000000000000000051331122015500235320ustar00rootroot000000000000001 = 2esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0045.tree.json000066400000000000000000000073111331122015500250340ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "AssignmentExpression", "operator": "=", "left": { "type": "Literal", "value": 1, "raw": "1", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "right": { "type": "Literal", "value": 2, "raw": "2", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "1", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "=", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Numeric", "value": "2", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } } ], "errors": [ { "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Invalid left-hand side in assignment" } ], "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0046.js000066400000000000000000000000031331122015500235310ustar00rootroot000000000000003++esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0046.tree.json000066400000000000000000000054171331122015500250420ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "++", "argument": { "type": "Literal", "value": 3, "raw": "3", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, "prefix": false, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } ], "sourceType": "script", "tokens": [ { "type": "Numeric", "value": "3", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "++", "range": [ 1, 3 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 3 } } } ], "errors": [ { "index": 1, "lineNumber": 1, "column": 2, "message": "Error: Line 1: Invalid left-hand side in assignment" } ], "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0047.js000066400000000000000000000000031331122015500235320ustar00rootroot00000000000000--4esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0047.tree.json000066400000000000000000000054161331122015500250420ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "UpdateExpression", "operator": "--", "argument": { "type": "Literal", "value": 4, "raw": "4", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, "prefix": true, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "--", "range": [ 0, 2 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 2 } } }, { "type": "Numeric", "value": "4", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } } ], "errors": [ { "index": 3, "lineNumber": 1, "column": 4, "message": "Error: Line 1: Invalid left-hand side in assignment" } ], "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0048.js000066400000000000000000000000201331122015500235320ustar00rootroot00000000000000for (5 in []) {}esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0048.tree.json000066400000000000000000000137061331122015500250440ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ForInStatement", "left": { "type": "Literal", "value": 5, "raw": "5", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, "right": { "type": "ArrayExpression", "elements": [], "range": [ 10, 12 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 12 } } }, "body": { "type": "BlockStatement", "body": [], "range": [ 14, 16 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 16 } } }, "each": false, "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "for", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Numeric", "value": "5", "range": [ 5, 6 ], "loc": { "start": { "line": 1, "column": 5 }, "end": { "line": 1, "column": 6 } } }, { "type": "Keyword", "value": "in", "range": [ 7, 9 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "[", "range": [ 10, 11 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 11 } } }, { "type": "Punctuator", "value": "]", "range": [ 11, 12 ], "loc": { "start": { "line": 1, "column": 11 }, "end": { "line": 1, "column": 12 } } }, { "type": "Punctuator", "value": ")", "range": [ 12, 13 ], "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 13 } } }, { "type": "Punctuator", "value": "{", "range": [ 14, 15 ], "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": "}", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ], "errors": [ { "index": 6, "lineNumber": 1, "column": 7, "message": "Error: Line 1: Invalid left-hand side in for-in" } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0049.js000066400000000000000000000000221331122015500235350ustar00rootroot00000000000000var x = /[P QR]/\gesprima-4.0.1/test/fixtures/tolerant-parse/migrated_0049.tree.json000066400000000000000000000111171331122015500250370ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": {}, "raw": "/[P QR]/\\g", "regex": { "pattern": "[P QR]", "flags": "g" }, "range": [ 8, 18 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 18 } } }, "range": [ 4, 18 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 18 } } } ], "kind": "var", "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "RegularExpression", "value": "/[P QR]/\\g", "regex": { "pattern": "[P QR]", "flags": "g" }, "range": [ 8, 18 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 18 } } } ], "errors": [ { "index": 17, "lineNumber": 1, "column": 18, "message": "Error: Line 1: Unexpected token ILLEGAL" } ], "range": [ 0, 18 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 18 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0050.source.js000066400000000000000000000000511331122015500250260ustar00rootroot00000000000000var source = 'var x = /[P QR]/\\\\u0067';esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0050.tree.json000066400000000000000000000114011331122015500250230ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "VariableDeclaration", "declarations": [ { "type": "VariableDeclarator", "id": { "type": "Identifier", "name": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, "init": { "type": "Literal", "value": {}, "raw": "/[P QR]/\\\\u0067", "regex": { "pattern": "[P QR]", "flags": "g" }, "range": [ 8, 23 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 23 } } }, "range": [ 4, 23 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 23 } } } ], "kind": "var", "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "RegularExpression", "value": "/[P QR]/\\\\u0067", "regex": { "pattern": "[P QR]", "flags": "g" }, "range": [ 8, 23 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 23 } } } ], "errors": [ { "index": 17, "lineNumber": 1, "column": 18, "message": "Error: Line 1: Unexpected token ILLEGAL" }, { "index": 23, "lineNumber": 1, "column": 24, "message": "Error: Line 1: Unexpected token ILLEGAL" } ], "range": [ 0, 23 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0051.js000066400000000000000000000000321331122015500235270ustar00rootroot00000000000000({x(eval){"use strict";}})esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0051.tree.json000066400000000000000000000301431331122015500250300ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "eval", "range": [ 4, 8 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 8 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 10, 22 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 22 } } }, "directive": "use strict", "range": [ 10, 23 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 23 } } } ], "range": [ 9, 24 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 24 } } }, "generator": false, "expression": false, "async": false, "range": [ 3, 24 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 24 } } }, "kind": "init", "method": true, "shorthand": false, "range": [ 2, 24 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 24 } } } ], "range": [ 1, 25 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 25 } } }, "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "{", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "x", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "eval", "range": [ 4, 8 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "{", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "String", "value": "\"use strict\"", "range": [ 10, 22 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": ";", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "}", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": "}", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, { "type": "Punctuator", "value": ")", "range": [ 25, 26 ], "loc": { "start": { "line": 1, "column": 25 }, "end": { "line": 1, "column": 26 } } } ], "errors": [ { "index": 4, "lineNumber": 1, "column": 5, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" } ], "range": [ 0, 26 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 26 } } } esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0052.js000066400000000000000000000000311331122015500235270ustar00rootroot00000000000000({x(eval){"use strict"}})esprima-4.0.1/test/fixtures/tolerant-parse/migrated_0052.tree.json000066400000000000000000000273111331122015500250340ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "ObjectExpression", "properties": [ { "type": "Property", "key": { "type": "Identifier", "name": "x", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, "computed": false, "value": { "type": "FunctionExpression", "id": null, "params": [ { "type": "Identifier", "name": "eval", "range": [ 4, 8 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 8 } } } ], "body": { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": "use strict", "raw": "\"use strict\"", "range": [ 10, 22 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 22 } } }, "directive": "use strict", "range": [ 10, 22 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 22 } } } ], "range": [ 9, 23 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 23 } } }, "generator": false, "expression": false, "async": false, "range": [ 3, 23 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 23 } } }, "kind": "init", "method": true, "shorthand": false, "range": [ 2, 23 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 23 } } } ], "range": [ 1, 24 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 24 } } }, "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "(", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Punctuator", "value": "{", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Identifier", "value": "x", "range": [ 2, 3 ], "loc": { "start": { "line": 1, "column": 2 }, "end": { "line": 1, "column": 3 } } }, { "type": "Punctuator", "value": "(", "range": [ 3, 4 ], "loc": { "start": { "line": 1, "column": 3 }, "end": { "line": 1, "column": 4 } } }, { "type": "Identifier", "value": "eval", "range": [ 4, 8 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 8 } } }, { "type": "Punctuator", "value": ")", "range": [ 8, 9 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 9 } } }, { "type": "Punctuator", "value": "{", "range": [ 9, 10 ], "loc": { "start": { "line": 1, "column": 9 }, "end": { "line": 1, "column": 10 } } }, { "type": "String", "value": "\"use strict\"", "range": [ 10, 22 ], "loc": { "start": { "line": 1, "column": 10 }, "end": { "line": 1, "column": 22 } } }, { "type": "Punctuator", "value": "}", "range": [ 22, 23 ], "loc": { "start": { "line": 1, "column": 22 }, "end": { "line": 1, "column": 23 } } }, { "type": "Punctuator", "value": "}", "range": [ 23, 24 ], "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 24 } } }, { "type": "Punctuator", "value": ")", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ], "errors": [ { "index": 4, "lineNumber": 1, "column": 5, "message": "Error: Line 1: Parameter name eval or arguments is not allowed in strict mode" } ], "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } esprima-4.0.1/test/fixtures/tolerant-parse/string_literal_escape_eight.js000066400000000000000000000000211331122015500270060ustar00rootroot00000000000000var x = 'abc\8'; esprima-4.0.1/test/fixtures/tolerant-parse/string_literal_escape_eight.tree.json000066400000000000000000000113341331122015500303120ustar00rootroot00000000000000{ "type": "Program", "body": [ { "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } }, "type": "VariableDeclaration", "declarations": [ { "range": [ 4, 15 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 15 } }, "type": "VariableDeclarator", "id": { "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } }, "type": "Identifier", "name": "x" }, "init": { "range": [ 8, 15 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 15 } }, "type": "Literal", "value": "abc8", "raw": "'abc\\8'" } } ], "kind": "var" } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "var", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "x", "range": [ 4, 5 ], "loc": { "start": { "line": 1, "column": 4 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "=", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "String", "value": "'abc\\8'", "range": [ 8, 15 ], "loc": { "start": { "line": 1, "column": 8 }, "end": { "line": 1, "column": 15 } } }, { "type": "Punctuator", "value": ";", "range": [ 15, 16 ], "loc": { "start": { "line": 1, "column": 15 }, "end": { "line": 1, "column": 16 } } } ], "errors": [ { "index": 14, "lineNumber": 1, "column": 15, "message": "Error: Line 1: Unexpected token ILLEGAL" } ], "range": [ 0, 16 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 16 } } } esprima-4.0.1/test/fixtures/tolerant-parse/while-missing-parenthesis.js000066400000000000000000000000151331122015500263710ustar00rootroot00000000000000while (true esprima-4.0.1/test/fixtures/tolerant-parse/while-missing-parenthesis.tree.json000066400000000000000000000060121331122015500276670ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "WhileStatement", "test": { "type": "Literal", "value": true, "raw": "true", "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } } }, "body": { "range": [ 13, 13 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 0 } }, "type": "EmptyStatement" }, "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 0 } } } ], "sourceType": "script", "range": [ 0, 13 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 2, "column": 0 } }, "tokens": [ { "type": "Keyword", "value": "while", "range": [ 0, 5 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 5 } } }, { "type": "Punctuator", "value": "(", "range": [ 6, 7 ], "loc": { "start": { "line": 1, "column": 6 }, "end": { "line": 1, "column": 7 } } }, { "type": "Boolean", "value": "true", "range": [ 7, 11 ], "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 11 } } } ], "errors": [ { "index": 13, "lineNumber": 2, "column": 1, "message": "Error: Line 2: Unexpected end of input" } ] } esprima-4.0.1/test/fixtures/whitespace/000077500000000000000000000000001331122015500201315ustar00rootroot00000000000000esprima-4.0.1/test/fixtures/whitespace/migrated_0000.source.js000066400000000000000000000002111331122015500242130ustar00rootroot00000000000000var source = 'new\x20\x09\x0B\x0C\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\uFEFFa'; esprima-4.0.1/test/fixtures/whitespace/migrated_0000.tree.json000066400000000000000000000050251331122015500242170ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "ExpressionStatement", "expression": { "type": "NewExpression", "callee": { "type": "Identifier", "name": "a", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } }, "arguments": [], "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } }, "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } ], "sourceType": "script", "tokens": [ { "type": "Keyword", "value": "new", "range": [ 0, 3 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 3 } } }, { "type": "Identifier", "value": "a", "range": [ 24, 25 ], "loc": { "start": { "line": 1, "column": 24 }, "end": { "line": 1, "column": 25 } } } ], "range": [ 0, 25 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 25 } } } esprima-4.0.1/test/fixtures/whitespace/migrated_0001.source.js000066400000000000000000000000531331122015500242200ustar00rootroot00000000000000var source = '{0\x0A1\x0D2\u20283\u20294}';esprima-4.0.1/test/fixtures/whitespace/migrated_0001.tree.json000066400000000000000000000224641331122015500242260ustar00rootroot00000000000000{ "type": "Program", "body": [ { "type": "BlockStatement", "body": [ { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 0, "raw": "0", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 1, "raw": "1", "range": [ 3, 4 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 1 } } }, "range": [ 3, 4 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 1 } } }, { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 2, "raw": "2", "range": [ 5, 6 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 1 } } }, "range": [ 5, 6 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 1 } } }, { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 3, "raw": "3", "range": [ 7, 8 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 1 } } }, "range": [ 7, 8 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 1 } } }, { "type": "ExpressionStatement", "expression": { "type": "Literal", "value": 4, "raw": "4", "range": [ 9, 10 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 1 } } }, "range": [ 9, 10 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 1 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 5, "column": 2 } } } ], "sourceType": "script", "tokens": [ { "type": "Punctuator", "value": "{", "range": [ 0, 1 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 1 } } }, { "type": "Numeric", "value": "0", "range": [ 1, 2 ], "loc": { "start": { "line": 1, "column": 1 }, "end": { "line": 1, "column": 2 } } }, { "type": "Numeric", "value": "1", "range": [ 3, 4 ], "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 1 } } }, { "type": "Numeric", "value": "2", "range": [ 5, 6 ], "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 1 } } }, { "type": "Numeric", "value": "3", "range": [ 7, 8 ], "loc": { "start": { "line": 4, "column": 0 }, "end": { "line": 4, "column": 1 } } }, { "type": "Numeric", "value": "4", "range": [ 9, 10 ], "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 5, "column": 1 } } }, { "type": "Punctuator", "value": "}", "range": [ 10, 11 ], "loc": { "start": { "line": 5, "column": 1 }, "end": { "line": 5, "column": 2 } } } ], "range": [ 0, 11 ], "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 5, "column": 2 } } } esprima-4.0.1/test/grammar-tests.js000066400000000000000000000033211331122015500172470ustar00rootroot00000000000000/* Copyright JS Foundation and other contributors, https://js.foundation/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ var esprima = require('../'); function readEverythingJsProgram(type) { return require('fs').readFileSync(require.resolve('everything.js/' + type), 'utf-8'); } try { esprima.parse(readEverythingJsProgram('es2015-script')); esprima.parse(readEverythingJsProgram('es2015-module'), { sourceType: 'module' }); } catch (e) { console.error('Error:', e.toString()); process.exit(1); } esprima-4.0.1/test/hostile-environment-tests.js000066400000000000000000000041661331122015500216420ustar00rootroot00000000000000/* Copyright JS Foundation and other contributors, https://js.foundation/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 'use strict'; var esprima = require('../'), failures = 0, defineProperty = Object.defineProperty; delete Object.defineProperty; try { esprima.parse('function f(a){}'); } catch (e) { ++failures; } Object.defineProperty = defineProperty; if (typeof Object.defineProperty === 'function') { Object.defineProperty(Object.prototype, '$a', { get: function () { }, configurable: true }); try { esprima.parse('function f(a){}'); } catch (e) { ++failures; } delete Object.prototype.$a; } else { Object.defineProperty = function (o, p, desc) { o[p] = desc.value; }; try { esprima.parse('function f(a){}'); } catch (e) { ++failures; } delete Object.defineProperty; } process.exit(failures === 0 ? 0 : 1); esprima-4.0.1/test/karma.conf.js000066400000000000000000000027331331122015500165060ustar00rootroot00000000000000module.exports = function (config) { config.set({ basePath: '..', frameworks: [ 'mocha', 'detectBrowsers' ], files: [ 'dist/esprima.js', 'node_modules/lodash/index.js', 'test/dist/fixtures_js.js', 'test/dist/fixtures_json.js', 'test/utils/error-to-object.js', 'test/utils/create-testcases.js', 'test/utils/evaluate-testcase.js', 'test/browser-tests.js' ], exclude: [], client: { mocha: { reporter: 'html', // change Karma's debug.html to the mocha web reporter ui: 'bdd' } }, reporters: ['dots'], // available reporters: https://npmjs.org/browse/keyword/karma-reporter port: 9876, colors: true, logLevel: config.LOG_WARN, // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG autoWatch: true, singleRun: false, detectBrowsers: { enabled: true, usePhantomJS: false }, plugins: [ 'karma-mocha', 'karma-chrome-launcher', 'karma-edge-launcher', 'karma-firefox-launcher', 'karma-ie-launcher', 'karma-safari-launcher', 'karma-safaritechpreview-launcher', 'karma-detect-browsers' ] }); } esprima-4.0.1/test/line-ending-sample.js000066400000000000000000000000341331122015500201270ustar00rootroot00000000000000/* do not edit this file */ esprima-4.0.1/test/profile.js000066400000000000000000000042651331122015500161310ustar00rootroot00000000000000/* Copyright JS Foundation and other contributors, https://js.foundation/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ var fs = require('fs'), esprima = require('../'), N, fixture; // Loops for parsing, useful for stress-testing/profiling. N = 25; fixture = [ 'Underscore 1.5.2', 'Backbone 1.1.0', 'MooTools 1.4.5', 'jQuery 1.9.1', 'YUI 3.12.0', 'jQuery.Mobile 1.4.2', 'Angular 1.2.5' ]; console.log('Parsing libraries for sampling profiling analysis...'); fixture.forEach(function (name) { var filename, source, expected, syntax, tokens, i; filename = name.toLowerCase().replace(/\.js/g, 'js').replace(/\s/g, '-'); source = fs.readFileSync('test/3rdparty/' + filename + '.js', 'utf-8'); console.log(' ', name); try { for (i = 0; i < N; ++i) { syntax = esprima.parse(source, { range: true, loc: true, raw: true }); } } catch (e) { console.log('FATAL', e.toString()); process.exit(1); } }); esprima-4.0.1/test/regression-tests.js000066400000000000000000000114351331122015500200060ustar00rootroot00000000000000/* Copyright JS Foundation and other contributors, https://js.foundation/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ var fs = require('fs'), esprima = require('../'), N, fixture; // Loops for parsing, useful for stress-testing/profiling. N = 1; fixture = [ 'Underscore 1.5.2', 'Backbone 1.1.0', 'MooTools 1.4.5', 'jQuery 1.9.1', 'YUI 3.12.0', 'jQuery.Mobile 1.4.2', 'Angular 1.2.5' ]; function sortedObject(o) { var keys, result; if (o === null) { return o; } if (o instanceof Array) { return o.map(sortedObject); } if (typeof o !== 'object') { return o; } if (o instanceof RegExp) { return o; } keys = Object.keys(o); result = { range: undefined, loc: undefined }; keys.forEach(function (key) { if (o.hasOwnProperty(key)) { result[key] = sortedObject(o[key]); } }); return result; } function getBaselineSyntax(name) { var syntax, tree = null; try { syntax = fs.readFileSync('test/3rdparty/syntax/' + name + '.json', 'utf-8'); tree = sortedObject(JSON.parse(syntax)); } finally { return tree; } } function createBaselineSyntax(name, syntax) { var tree = JSON.stringify(syntax); fs.writeFileSync('test/3rdparty/syntax/' + name + '.json', tree, 'utf-8'); } function writeActualSyntax(name, syntax) { var tree = JSON.stringify(syntax); fs.writeFileSync('test/3rdparty/syntax/' + name + '.actual.json', tree, 'utf-8'); } function getBaselineTokens(name) { var data, tokens = null; try { data = fs.readFileSync('test/3rdparty/syntax/' + name + '.tokens', 'utf-8'); tokens = sortedObject(JSON.parse(data)); } finally { return tokens; } } function createBaselineTokens(name, tokens) { var data = JSON.stringify(sortedObject(tokens)); fs.writeFileSync('test/3rdparty/syntax/' + name + '.tokens', data, 'utf-8'); } function writeActualTokens(name, tokens) { var data = JSON.stringify(sortedObject(tokens)); fs.writeFileSync('test/3rdparty/syntax/' + name + '.actual.tokens', data, 'utf-8'); } console.log('Processing libraries...'); fixture.forEach(function (name) { var filename, source, expected, syntax, tokens, i; filename = name.toLowerCase().replace(/\.js/g, 'js').replace(/\s/g, '-'); source = fs.readFileSync('test/3rdparty/' + filename + '.js', 'utf-8'); console.log(' ', name); try { for (i = 0; i < N; ++i) { syntax = sortedObject(esprima.parse(source, { range: true, loc: true, raw: true })); tokens = sortedObject(esprima.tokenize(source, { range: true })); } expected = getBaselineSyntax(filename); if (expected) { if (JSON.stringify(expected) !== JSON.stringify(syntax)) { console.log(' Mismatch syntax tree!'); writeActualSyntax(filename, syntax); } } else { console.log(' Baseline syntax does not exist. Creating one...'); createBaselineSyntax(filename, syntax); } expected = getBaselineTokens(filename); if (expected) { if (JSON.stringify(expected) !== JSON.stringify(tokens)) { console.log(' Mismatch tokens!'); writeActualTokens(filename, tokens); } } else { console.log(' Baseline tokens do not exist. Creating one...'); createBaselineTokens(filename, tokens); } } catch (e) { console.log('FATAL', e.toString()); process.exit(1); } }); esprima-4.0.1/test/runner.html000066400000000000000000000040131331122015500163210ustar00rootroot00000000000000
esprima-4.0.1/test/saucelabs-evergreen.conf.js000066400000000000000000000014611331122015500213320ustar00rootroot00000000000000var configureSauceLabs = require('./configure-sauce-labs.js'); module.exports = function (config) { configureSauceLabs(config, 'Evergreen browsers', { Edge: { base: 'SauceLabs', browserName: 'microsoftedge', platform: 'Windows 10' }, Chrome: { base: 'SauceLabs', browserName: 'chrome', platform: 'Linux' }, Chrome_Mobile: { base: 'SauceLabs', browserName: 'android', platform: 'Linux' }, Firefox: { base: 'SauceLabs', browserName: 'firefox', platform: 'Linux' }, Safari: { base: 'SauceLabs', browserName: 'safari', platform: 'OS X 10.11' } }); } esprima-4.0.1/test/saucelabs-ie.conf.js000066400000000000000000000012731331122015500177460ustar00rootroot00000000000000var configureSauceLabs = require('./configure-sauce-labs.js'); module.exports = function (config) { configureSauceLabs(config, 'Internet Explorer browsers', { IE_11: { base: 'SauceLabs', browserName: 'internet explorer', platform: 'Windows 7', version: '11.0' }, IE_10: { base: 'SauceLabs', browserName: 'internet explorer', platform: 'Windows 7', version: '10.0' } /* IE_9: { base: 'SauceLabs', browserName: 'internet explorer', platform: 'Windows 7', version: '9.0' } */ }); } esprima-4.0.1/test/saucelabs-safari.conf.js000066400000000000000000000014571331122015500206220ustar00rootroot00000000000000var configureSauceLabs = require('./configure-sauce-labs.js'); module.exports = function (config) { configureSauceLabs(config, 'Safari browsers', { Safari_8: { base: 'SauceLabs', browserName: 'safari', platform: 'OS X 10.10', version: '8.0' }, Safari_7: { base: 'SauceLabs', browserName: 'safari', platform: 'OS X 10.9', version: '7.0' }, MobileSafari_9: { base: 'SauceLabs', browserName: 'iphone', platform: 'OS X 10.11', version: '9.0' }, MobileSafari_8: { base: 'SauceLabs', browserName: 'iphone', platform: 'OS X 10.11', version: '8.4' } }); } esprima-4.0.1/test/tsfmt.json000066400000000000000000000011521331122015500161530ustar00rootroot00000000000000{ "indentSize": 4, "tabSize": 4, "insertSpaceAfterCommaDelimiter": true, "insertSpaceAfterSemicolonInForStatements": true, "insertSpaceBeforeAndAfterBinaryOperators": true, "insertSpaceAfterKeywordsInControlFlowStatements": true, "insertSpaceAfterFunctionKeywordForAnonymousFunctions": true, "insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false, "insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false, "insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false, "placeOpenBraceOnNewLineForFunctions": false, "placeOpenBraceOnNewLineForControlBlocks": false } esprima-4.0.1/test/unit-tests.js000066400000000000000000000103751331122015500166070ustar00rootroot00000000000000/* Copyright JS Foundation and other contributors, https://js.foundation/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 'use strict'; var esprima = require('../'), evaluateTestCase = require('./utils/evaluate-testcase'), createTestCases = require('./utils/create-testcases'), errorToObject = require('./utils/error-to-object'), fs = require('fs'), path = require('path'), diff = require('json-diff').diffString, total = 0, result, failures = [], cases = {}, context = { source: '', result: null }, tick = new Date(), testCase, header; function generateTestCase(testCase) { var options, tree, filePath, fileName; fileName = testCase.key + ".tree.json"; try { options = { jsx: true, loc: true, range: true, tokens: true, sourceType: testCase.key.match(/\.module$/) ? 'module' : 'script' }; tree = esprima.parse(testCase.case, options); tree = JSON.stringify(tree, null, 4); } catch (e) { if (typeof e.index === 'undefined') { console.error("Failed to generate test result."); throw e; } tree = errorToObject(e); tree.description = e.description; tree = JSON.stringify(tree); fileName = testCase.key + ".failure.json"; } filePath = path.join(__dirname, 'fixtures', fileName); fs.writeFileSync(filePath, tree); console.error("Done."); } cases = createTestCases(); total = Object.keys(cases).length; Object.keys(cases).forEach(function (key) { testCase = cases[key]; if (testCase.hasOwnProperty('tree') || testCase.hasOwnProperty('tokens') || testCase.hasOwnProperty('failure') || testCase.hasOwnProperty('result')) { try { evaluateTestCase(testCase); } catch (e) { if (!e.expected) { throw e; } e.source = testCase.case || testCase.key; failures.push(e); } } else { console.error('Incomplete test case:' + testCase.key + '. Generating test result...'); generateTestCase(testCase); } }); tick = (new Date()) - tick; header = total + ' tests. ' + failures.length + ' failures. ' + tick + ' ms'; if (failures.length) { console.error(header); failures.forEach(function (failure) { var expectedObject, actualObject; try { expectedObject = JSON.parse(failure.expected); actualObject = JSON.parse(failure.actual); console.error(failure.source + ': Expected\n ' + failure.expected.split('\n').join('\n ') + '\nto match\n ' + failure.actual + '\nDiff:\n' + diff(expectedObject, actualObject)); } catch (ex) { console.error(failure.source + ': Expected\n ' + failure.expected.split('\n').join('\n ') + '\nto match\n ' + failure.actual); } }); } else { console.log(header); } process.exit(failures.length === 0 ? 0 : 1); esprima-4.0.1/test/utils/000077500000000000000000000000001331122015500152645ustar00rootroot00000000000000esprima-4.0.1/test/utils/create-testcases.js000066400000000000000000000076411331122015500210710ustar00rootroot00000000000000/* Copyright JS Foundation and other contributors, https://js.foundation/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 'use strict'; (function (root, factory) { if (typeof module === 'object' && module.exports) { module.exports = factory( require('lodash'), require('../dist/fixtures_js'), require('../dist/fixtures_json') ); } else { root.createTestCases = factory(_, window.fixtures_js, window.fixtures_json); } }(this, function (_, jsFixtures, jsonFixtures) { var cases; function addCase(key, kind, item) { if (!cases[key]) { cases[key] = { key: key }; } cases[key][kind] = item; } function addJsonFixture(value, filePath) { /** * Determines which type of test it is based on the filepath */ function getType() { return _(['tree', 'tokens', 'failure']).find(function (type) { var suffix = '.' + type; return (filePath.slice(-suffix.length) === suffix); }); } function getKey() { return filePath.slice(0, -getType().length - 1) } function getValue() { return value; } return addCase(getKey(), getType(), getValue()); } function addJSFixture(value, filePath) { /** * checks to see if filepath is a run or source type. */ function checkType(type) { var suffix = '.' + type; return filePath.slice(-suffix.length) === suffix } /** * builds a case key by stripping away the type */ function getKey(type) { return filePath.slice(0, -type.length - 1) } /** * returns the js test case. * In the case of source tests, the input needs to be evaluated. */ function getValue(value, shouldEval) { var source, newValue; if (shouldEval) { // return source from the eval newValue = eval(value + ';source'); } else { newValue = value; } return newValue; } if (checkType('run')) { return addCase(getKey('run'), 'run', getValue(value)); } if (checkType('source')) { return addCase(getKey('source'), 'source', getValue(value, true)); } return addCase(filePath, 'case', getValue(value)); } /** * Reads jsFixtures and jsonFixtures into cases dictionary */ return function () { cases = {}; _.each(jsFixtures, addJSFixture); _.each(jsonFixtures, addJsonFixture); return cases; } })); esprima-4.0.1/test/utils/error-to-object.js000066400000000000000000000033661331122015500206470ustar00rootroot00000000000000/* Copyright JS Foundation and other contributors, https://js.foundation/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 'use strict'; (function (root, factory) { if (typeof module === 'object' && module.exports) { module.exports = factory(); } else { root.errorToObject = factory(); } }(this, function() { return function (e) { 'use strict'; var msg = e.toString(); return { index: e.index, lineNumber: e.lineNumber, column: e.column, message: msg }; } }));esprima-4.0.1/test/utils/evaluate-testcase.js000066400000000000000000000333501331122015500212450ustar00rootroot00000000000000/* Copyright JS Foundation and other contributors, https://js.foundation/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ 'use strict'; (function (root, factory) { if (typeof module === 'object' && module.exports) { module.exports = factory( require('../../'), require('./error-to-object') ); } else { root.evaluateTestCase = factory(esprima, errorToObject); } }(this, function (esprima, errorToObject) { function NotMatchingError(expected, actual) { Error.call(this, 'Expected '); this.expected = expected; this.actual = actual; } NotMatchingError.prototype = new Error(); function assertEquality(expected, actual) { if (expected !== actual) { throw new NotMatchingError(expected, actual); } } function sortedObject(o) { var keys, result; if (o === null) { return o; } if (Array.isArray(o)) { return o.map(sortedObject); } if (typeof o !== 'object') { return o; } if (o instanceof RegExp) { return o; } keys = Object.keys(o); result = { range: undefined, loc: undefined }; keys.forEach(function (key) { if (o.hasOwnProperty(key)) { result[key] = sortedObject(o[key]); // Nullify regex value for ES6 regex flags if (key === 'value' && o.hasOwnProperty('regex')) { if (o.regex.flags.match(/[uy]/)) { result[key] = null; } } } }); return result; } function hasAttachedComment(syntax) { var key; for (key in syntax) { if (key === 'leadingComments' || key === 'trailingComments' || key === 'innerComments') { return true; } if (typeof syntax[key] === 'object' && syntax[key] !== null) { if (hasAttachedComment(syntax[key])) { return true; } } } return false; } function testParse(code, syntax) { 'use strict'; var expected, tree, actual, options, i, len, nodes; options = { jsx: true, comment: (typeof syntax.comments !== 'undefined'), range: true, loc: true, tokens: true, raw: true, tolerant: (typeof syntax.errors !== 'undefined'), source: null, sourceType: syntax.sourceType }; if (options.comment) { options.attachComment = hasAttachedComment(syntax); } if (typeof syntax.tokens !== 'undefined') { if (syntax.tokens.length > 0) { options.range = (typeof syntax.tokens[0].range !== 'undefined'); options.loc = (typeof syntax.tokens[0].loc !== 'undefined'); } } if (typeof syntax.comments !== 'undefined') { if (syntax.comments.length > 0) { options.range = (typeof syntax.comments[0].range !== 'undefined'); options.loc = (typeof syntax.comments[0].loc !== 'undefined'); } } if (options.loc) { options.source = syntax.loc.source; } syntax = sortedObject(syntax); expected = JSON.stringify(syntax, null, 4); try { // Some variations of the options. tree = esprima.parse(code, { jsx: options.jsx, tolerant: options.tolerant, sourceType: options.sourceType }); tree = esprima.parse(code, { jsx: options.jsx, tolerant: options.tolerant, sourceType: options.sourceType, range: true }); tree = esprima.parse(code, { jsx: options.jsx, tolerant: options.tolerant, sourceType: options.sourceType, loc: true }); tree = (options.sourceType === 'script') ? esprima.parseScript(code, options) : esprima.parseModule(code, options); esprima.parse(code, options); if (options.tolerant) { for (i = 0, len = tree.errors.length; i < len; i += 1) { tree.errors[i] = errorToObject(tree.errors[i]); } } tree = sortedObject(tree); actual = JSON.stringify(tree, null, 4); // Only to ensure that there is no error when using string object. esprima.parse(new String(code), options); } catch (e) { throw new NotMatchingError(expected, e.toString()); } assertEquality(expected, actual); function filter(key, value) { return (key === 'loc' || key === 'range') ? undefined : value; } if (options.tolerant) { return; } // Check again without any location info. options.range = false; options.loc = false; syntax = sortedObject(syntax); expected = JSON.stringify(syntax, filter, 4); try { tree = esprima.parse(code, options); if (options.tolerant) { for (i = 0, len = tree.errors.length; i < len; i += 1) { tree.errors[i] = errorToObject(tree.errors[i]); } } tree = sortedObject(tree); actual = JSON.stringify(tree, filter, 4); } catch (e) { throw new NotMatchingError(expected, e.toString()); } assertEquality(expected, actual); function collect(node) { nodes.push(node); } function filter(node) { if (node.type === 'Program') { nodes.push(node); } } // Use the delegate to collect the nodes. try { nodes = []; esprima.parse(code, options, collect); } catch (e) { throw new NotMatchingError(expected, e.toString()); } // The last one, the most top-level node, is always a Program node. assertEquality('Program', nodes.pop().type); // Use the delegate to filter the nodes. try { nodes = []; esprima.parse(code, options, filter); } catch (e) { throw new NotMatchingError(expected, e.toString()); } // Every tree will have exactly one Program node. assertEquality('Program', nodes[0].type); // Exercise more code paths with the delegate try { esprima.parse(code); (options.sourceType === 'module') ? esprima.parseModule(code) : esprima.parseScript(code); esprima.parse(code, { range: false, loc: false, comment: false }, filter); esprima.parse(code, { range: true, loc: false, comment: false }, filter); esprima.parse(code, { range: false, loc: true, comment: false }, filter); esprima.parse(code, { range: true, loc: true, comment: false }, filter); esprima.parse(code, { range: false, loc: false, comment: true }, filter); esprima.parse(code, { range: true, loc: false, comment: true }, filter); esprima.parse(code, { range: false, loc: true, comment: true }, filter); esprima.parse(code, { range: true, loc: true, comment: true }, filter); } catch (e) { // Ignore, do nothing } } function testTokenize(code, tokens) { 'use strict'; var options, expected, actual, list, entries, types; options = { comment: true, tolerant: true, loc: true, range: true }; expected = JSON.stringify(tokens, null, 4); try { // Some variations of the options (tolerant mode, to avoid premature error) esprima.tokenize(code, { tolerant: true, comment: false, loc: false, range: false }); esprima.tokenize(code, { tolerant: true, comment: false, loc: false, range: true }); esprima.tokenize(code, { tolerant: true, comment: false, loc: true, range: false }); esprima.tokenize(code, { tolerant: true, comment: false, loc: true, range: true }); esprima.tokenize(code, { tolerant: true, comment: true, loc: false, range: false }); esprima.tokenize(code, { tolerant: true, comment: true, loc: false, range: true }); esprima.tokenize(code, { tolerant: true, comment: true, loc: true, range: false }); list = esprima.tokenize(code, options); actual = JSON.stringify(list, null, 4); } catch (e) { throw new NotMatchingError(expected, e.toString()); } if (expected !== actual) { throw new NotMatchingError(expected, actual); } // Use the delegate to collect the token separately. try { entries = []; esprima.tokenize(code, options, function (token) { entries.push(token); return token; }); actual = JSON.stringify(entries, null, 4); } catch (e) { throw new NotMatchingError(expected, e.toString()); } if (expected !== actual) { throw new NotMatchingError(expected, actual); } // Use the delegate to filter the token type. try { entries = esprima.tokenize(code, options, function (token) { return token.type; }); actual = JSON.stringify(entries, null, 4); } catch (e) { throw new NotMatchingError(expected, e.toString()); } types = tokens.map(function (t) { return t.type; }); expected = JSON.stringify(types, null, 4); if (expected !== actual) { throw new NotMatchingError(expected, actual); } // Exercise more code paths try { esprima.tokenize(code); esprima.tokenize(code, { tolerant: false }); } catch (e) { // Ignore, do nothing } } function testError(testCase) { 'use strict'; var sourceType, i, options, exception, expected, code, actual, err, handleInvalidRegexFlag, tokenize; // Different parsing options should give the same error. sourceType = testCase.key.match(/\.module$/) ? 'module' : 'script'; options = [ { jsx: true, sourceType: sourceType }, { jsx: true, comment: true, sourceType: sourceType }, { jsx: true, raw: true, sourceType: sourceType }, { jsx: true, raw: true, comment: true, sourceType: sourceType } ]; // If handleInvalidRegexFlag is true, an invalid flag in a regular expression // will throw an exception. In some old version of V8, this is not the case // and hence handleInvalidRegexFlag is false. handleInvalidRegexFlag = false; try { 'test'.match(new RegExp('[a-z]', 'x')); } catch (e) { handleInvalidRegexFlag = true; } exception = testCase.failure; exception.description = exception.message.replace(/Error: Line [0-9]+: /, ''); if (exception.tokenize) { tokenize = true; exception.tokenize = undefined; } expected = JSON.stringify(exception); code = testCase.case || testCase.source || ''; for (i = 0; i < options.length; i += 1) { try { if (tokenize) { esprima.tokenize(code, options[i]); } else { esprima.parse(code, options[i]); } } catch (e) { err = errorToObject(e); err.description = e.description; actual = JSON.stringify(err); } if (expected !== actual) { // Compensate for old V8 which does not handle invalid flag. if (exception.message.indexOf('Invalid regular expression') > 0) { if (typeof actual === 'undefined' && !handleInvalidRegexFlag) { return; } } throw new NotMatchingError(expected, actual); } } } return function (testCase) { var code = testCase.case || testCase.source || ""; if (testCase.hasOwnProperty('tree')) { testParse(code, testCase.tree); } else if (testCase.hasOwnProperty('tokens')) { testTokenize(testCase.case, testCase.tokens); } else if (testCase.hasOwnProperty('failure')) { testError(testCase); } } })); esprima-4.0.1/test/verify-line-ending.js000066400000000000000000000007221331122015500201560ustar00rootroot00000000000000#!/usr/bin/env node 'use strict'; var fs = require('fs'); var fname = 'test/line-ending-sample.js'; var content = fs.readFileSync(fname, 'utf-8'); var lines = content.split('\n'); if (content.length !== 28 || lines.length !== 8) { console.error(fname, 'uses an incorrect line ending.'); console.error('Please verify that the repository was checked out properly!'); process.exit(-1); } else { console.log(fname, 'has the correct line endings.'); } esprima-4.0.1/tools/000077500000000000000000000000001331122015500143055ustar00rootroot00000000000000esprima-4.0.1/tools/fixupbundle.js000066400000000000000000000040251331122015500171710ustar00rootroot00000000000000#!/usr/bin/env node /* Copyright JS Foundation and other contributors, https://js.foundation/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ var fs = require('fs'); function fixupbundle(filename) { var content, lines, i, line; content = fs.readFileSync(filename, 'utf-8'); lines = content.split('\n'); for (i = 0; i < lines.length; ++i) { line = lines[i]; if (line.match(/if\(typeof\sexports/)) { lines[i] = '/* istanbul ignore next */\n' + line; } if (line.match(/if\(installedModules\[moduleId\]/)) { lines[i] = '/* istanbul ignore if */\n' + line; } if (line.match(/var __extends/)) { lines[i] = '/* istanbul ignore next */\n' + line; } } content = lines.join('\n'); fs.writeFileSync(filename, content, 'utf-8'); } fixupbundle(require.resolve('../')); esprima-4.0.1/tools/generate-fixtures.js000066400000000000000000000060151331122015500203060ustar00rootroot00000000000000/* Copyright JS Foundation and other contributors, https://js.foundation/ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Reads the fixture files in `test/fixtures` and writes two aggregate fixture files (`test/dist/fixtures_js.js` and `test/dist/fixtures_json.js`) */ 'use strict'; var fs = require('fs'), glob = require("glob"), path = require('path'), fixturePath = 'test/fixtures', fixtureDist = 'test/dist'; function renderFixturesFile(ext, stringify) { var fixtureFilePaths, fixtures, content, fixtureDistPath; function renderFixture(filePath) { var content, relativeFilePath, key, value; content = fs.readFileSync(filePath, 'utf-8'); relativeFilePath = path.relative(fixturePath, filePath); // On Windows, convert the native separator (backslash) into slash. relativeFilePath = relativeFilePath.split(path.sep).join('/'); key = relativeFilePath.substring(0, relativeFilePath.length - ext.length - 1); value = stringify ? JSON.stringify(content) : content; return "fixtures_" + ext + "['" + key + "'] = " + value + ";"; }; function templateFixtureFile(fixtures) { var content = ""; content += "var fixtures_" + ext + " = {};\n"; content += fixtures; content += "\nif(typeof module !== 'undefined'){ module.exports = fixtures_" + ext + "}"; return content; } fixtureFilePaths = glob.sync(path.join(__dirname, '../' + fixturePath + '/**/*.' + ext)); fixtures = fixtureFilePaths.map(renderFixture).join('\n'); content = templateFixtureFile(fixtures); fixtureDistPath = path.join(fixtureDist, 'fixtures_' + ext + '.js'); fs.writeFileSync(fixtureDistPath, content); console.log('built', fixtureDistPath); } renderFixturesFile('js', true); renderFixturesFile('json', false); esprima-4.0.1/tools/generate-identifier-regex.js000066400000000000000000000024421331122015500216670ustar00rootroot00000000000000// Based on https://gist.github.com/mathiasbynens/6334847 by @mathias var regenerate = require('regenerate'); // Which Unicode version should be used? var version = '8.0.0'; // note: also update `package.json` when this changes // Shorthand function var get = function(what) { return require('unicode-' + version + '/' + what + '/code-points'); }; var generateES6Regex = function() { // ES 6 // https://mathiasbynens.be/notes/javascript-identifiers-es6 var identifierStart = regenerate(get('properties/ID_Start')) .add('$', '_') .removeRange(0x0, 0x7F); // remove ASCII symbols (Esprima-specific) var identifierPart = regenerate(get('properties/ID_Continue')) .add(get('properties/Other_ID_Start')) .add('\u200C', '\u200D') .add('$', '_') .removeRange(0x0, 0x7F); // remove ASCII symbols (Esprima-specific) return { 'NonAsciiIdentifierStart': '/' + identifierStart + '/', 'NonAsciiIdentifierPart': '/' + identifierPart + '/' }; }; var result = generateES6Regex(); console.log( '// ECMAScript 6/Unicode v%s NonAsciiIdentifierStart:\n%s\n', version, result.NonAsciiIdentifierStart ); console.log( '// ECMAScript 6/Unicode v%s NonAsciiIdentifierPart:\n%s', version, result.NonAsciiIdentifierPart ); esprima-4.0.1/tools/generate-xhtml-entities.js000066400000000000000000000052361331122015500214170ustar00rootroot00000000000000#!/usr/bin/env node var https = require('https'); function get(uri, callback) { var content = ''; // console.log('Downloading', uri); https.request(uri, function (response) { response.on('data', function (chunk) { content += chunk; }); response.on('end', function () { callback(content); }); }).end(); } function process(uri, callback) { var entities = []; get(uri, function (content) { var lines = content.split('\n'); lines.forEach(function (line) { var name, code; if (line.indexOf('